diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-08-24 02:43:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-08-24 02:43:20 +0300 |
commit | bfdbfaadddf66d2eaa7b21cc5d7568aab1f3fc56 (patch) | |
tree | 72e72fb1f38f4cfd6b6a1ee187c19b3a3420ffc4 | |
parent | 49a106f6d4c605005ff411a5377285a8abcf51b5 (diff) | |
download | hercules-bfdbfaadddf66d2eaa7b21cc5d7568aab1f3fc56.tar.gz hercules-bfdbfaadddf66d2eaa7b21cc5d7568aab1f3fc56.tar.bz2 hercules-bfdbfaadddf66d2eaa7b21cc5d7568aab1f3fc56.tar.xz hercules-bfdbfaadddf66d2eaa7b21cc5d7568aab1f3fc56.zip |
Fix out of bound access in clif_guild_belonginfo.
-rw-r--r-- | src/map/clif.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 71ae22ec3..fd8a3c783 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7629,12 +7629,13 @@ static void clif_guild_created(struct map_session_data *sd, int flag) /// mode: @see enum guild_permission static void clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { - int ps,fd; nullpo_retv(sd); nullpo_retv(g); - fd=sd->fd; - ps=guild->getposition(g,sd); + int fd = sd->fd; + int ps = guild->getposition(g, sd); + Assert_retv(ps != -1); + WFIFOHEAD(fd,packet_len(0x16c)); WFIFOW(fd,0)=0x16c; WFIFOL(fd,2)=g->guild_id; |