From c276e2a6aa566400b1026236e7b2c09bfdcb72b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 15 Nov 2015 18:46:04 +0300 Subject: Not allow send too big variable names to char server from map server (Closes #865) Closes #866 as merged --- src/map/intif.c | 4 ++++ 1 file changed, 4 insertions(+) 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! */ -- cgit v1.2.3-70-g09d2