From 131b943bbfbf54da4040e943608123d5ea5caf82 Mon Sep 17 00:00:00 2001 From: Lucas Brito Date: Sat, 28 Oct 2017 14:28:19 -0300 Subject: Overflow correction in visual function bg_message --- src/map/clif.c | 3 +++ 1 file changed, 3 insertions(+) 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)); -- cgit v1.2.3-70-g09d2