diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-21 03:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-21 03:54:31 +0300 |
commit | f8ac1ea153cd99b6da61e0802212da2b6eea21bb (patch) | |
tree | c9dfe045a4bf1b0c001f1462ec4d35a33aaa9ea9 | |
parent | d1be48e253106e4efaf9db40fce0609cede4f778 (diff) | |
download | hercules-f8ac1ea153cd99b6da61e0802212da2b6eea21bb.tar.gz hercules-f8ac1ea153cd99b6da61e0802212da2b6eea21bb.tar.bz2 hercules-f8ac1ea153cd99b6da61e0802212da2b6eea21bb.tar.xz hercules-f8ac1ea153cd99b6da61e0802212da2b6eea21bb.zip |
Fix use after free error in @reloadatcommand gm command.s20180222
-rw-r--r-- | src/map/atcommand.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2bcb22738..3d43234d3 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -10210,6 +10210,8 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa return true; } + // reassign to info is need to avoid use after free [4144] + info = atcommand->get_info_byname(atcommand->check_alias(command + 1)); if (info->log) /* log only if this command should be logged [Ind/Hercules] */ logs->atcommand(sd, is_atcommand ? atcmd_msg : message); |