From f8ac1ea153cd99b6da61e0802212da2b6eea21bb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Feb 2018 03:51:23 +0300 Subject: Fix use after free error in @reloadatcommand gm command. --- src/map/atcommand.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3-70-g09d2