diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-15 18:46:04 +0300 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-22 04:11:51 +0100 |
commit | c276e2a6aa566400b1026236e7b2c09bfdcb72b5 (patch) | |
tree | 42b67aa3a981dc593b692f7c1afdccf8b9c57522 | |
parent | b5021bf40bb1d0a6d38d7b85789703dc12a26180 (diff) | |
download | hercules-c276e2a6aa566400b1026236e7b2c09bfdcb72b5.tar.gz hercules-c276e2a6aa566400b1026236e7b2c09bfdcb72b5.tar.bz2 hercules-c276e2a6aa566400b1026236e7b2c09bfdcb72b5.tar.xz hercules-c276e2a6aa566400b1026236e7b2c09bfdcb72b5.zip |
Not allow send too big variable names to char server from map server (Closes #865)
Closes #866 as merged
-rw-r--r-- | src/map/intif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 8066d07b9..016b4f7d3 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -333,6 +333,10 @@ int intif_saveregistry(struct map_session_data *sd) { if( varname[0] == '@' ) /* @string$ can get here, so we skip */ continue; + if (strlen(varname) > SCRIPT_VARNAME_LENGTH) { + ShowError("Variable name too big: %s\n", varname); + continue; + } src = DB->data2ptr(data); /* no need! */ |