summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-15 18:46:04 +0300
committerHaru <haru@dotalux.com>2015-12-22 04:11:51 +0100
commitc276e2a6aa566400b1026236e7b2c09bfdcb72b5 (patch)
tree42b67aa3a981dc593b692f7c1afdccf8b9c57522
parentb5021bf40bb1d0a6d38d7b85789703dc12a26180 (diff)
downloadhercules-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.c4
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! */