diff options
author | Lucas Brito <lucasljsb@gmail.com> | 2017-10-28 14:28:19 -0300 |
---|---|---|
committer | Asheraf <acheraf1998@gmail.com> | 2018-01-30 04:20:26 +0000 |
commit | 131b943bbfbf54da4040e943608123d5ea5caf82 (patch) | |
tree | 628d847412e7ae5d00c288ba82e433d4163bc1da /src/map | |
parent | 6542b3dc2da7f5a450abcc9d5c71af4a66e15963 (diff) | |
download | hercules-131b943bbfbf54da4040e943608123d5ea5caf82.tar.gz hercules-131b943bbfbf54da4040e943608123d5ea5caf82.tar.bz2 hercules-131b943bbfbf54da4040e943608123d5ea5caf82.tar.xz hercules-131b943bbfbf54da4040e943608123d5ea5caf82.zip |
Overflow correction in visual function bg_message
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 988e821e7..6de375e49 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -16533,6 +16533,9 @@ void clif_bg_message(struct battleground_data *bgd, int src_id, const char *name return; len = (int)strlen(mes); +#if PACKETVER <= 20120716 + len += 1; +#endif Assert_retv(len <= INT16_MAX - NAME_LENGTH - 8); buf = (unsigned char*)aMalloc((len + NAME_LENGTH + 8)*sizeof(unsigned char)); |