Skip to content

Commit

Permalink
Merge pull request #1890 from lucaslsb/stable
Browse files Browse the repository at this point in the history
Overflow correction in visual function bg_message
  • Loading branch information
MishimaHaruna authored Feb 10, 2018
2 parents c981552 + 131b943 commit b15fb6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit b15fb6a

Please sign in to comment.