diff options
author | Haru <haru@dotalux.com> | 2016-05-01 20:44:33 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-05-01 20:44:55 +0200 |
commit | 58a7bf46508b7f186704e7efb39576e09f0ab866 (patch) | |
tree | b35c04a0a8db0cb1145fa2e6a45c5cb433bd043a /src/map | |
parent | 95b4e328c254fdb060307990c37ac6acf3cce65f (diff) | |
download | hercules-58a7bf46508b7f186704e7efb39576e09f0ab866.tar.gz hercules-58a7bf46508b7f186704e7efb39576e09f0ab866.tar.bz2 hercules-58a7bf46508b7f186704e7efb39576e09f0ab866.tar.xz hercules-58a7bf46508b7f186704e7efb39576e09f0ab866.zip |
Fixed truncation of `@request` messages
- The `@request` command still makes an inter-server call. This will be fixed at a later point.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/intif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 346a847c8..2d6d39406 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1035,11 +1035,11 @@ void intif_parse_WisToGM(int fd) mes_len = RFIFOW(fd,2) - 33; // Length not including the NUL terminator Assert_retv(mes_len > 0 && mes_len < 32000); - message = (mes_len >= 255 ? aMalloc(mes_len) : mbuf); + message = (mes_len >= 255 ? aMalloc(mes_len + 1) : mbuf); permission = RFIFOL(fd,28); safestrncpy(Wisp_name, RFIFOP(fd,4), NAME_LENGTH); - safestrncpy(message, RFIFOP(fd,32), mes_len); + safestrncpy(message, RFIFOP(fd,32), mes_len + 1); // information is sent to all online GM map->foreachpc(intif->pWisToGM_sub, permission, Wisp_name, message, mes_len); |