diff options
author | Haru <haru@dotalux.com> | 2018-02-10 16:35:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-10 16:35:44 +0100 |
commit | b15fb6a27dde7cfb7c1af67d8384b6d12624645d (patch) | |
tree | c78a95ead1e0b71897a983c8b922f38072d8080c /src | |
parent | c9815528e0ebfd83f1b3739d5b4b09c52438b616 (diff) | |
parent | 131b943bbfbf54da4040e943608123d5ea5caf82 (diff) | |
download | hercules-b15fb6a27dde7cfb7c1af67d8384b6d12624645d.tar.gz hercules-b15fb6a27dde7cfb7c1af67d8384b6d12624645d.tar.bz2 hercules-b15fb6a27dde7cfb7c1af67d8384b6d12624645d.tar.xz hercules-b15fb6a27dde7cfb7c1af67d8384b6d12624645d.zip |
Merge pull request #1890 from lucaslsb/stable
Overflow correction in visual function bg_message
Diffstat (limited to 'src')
-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 0000c7aba..6e1cb4cf7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -16566,6 +16566,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)); |