Skip to content

Commit

Permalink
Actually message length is 255 (not 254), and limitation in Blizzard …
Browse files Browse the repository at this point in the history
…game clients is the same.
  • Loading branch information
HarpyWar committed May 24, 2014
1 parent 3b84005 commit af2bacc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1389,9 +1389,9 @@ namespace pvpgn
}

for (pos = offset; packet->u.data[pos] != '\0'; pos++)
if (pos >= size || pos - offset >= maxlen)
if (pos >= size || pos - offset > maxlen)
return NULL;
if (pos >= size || pos - offset >= maxlen) /* NUL must be inside too */
if (pos >= size || pos - offset > maxlen) /* NUL must be inside too */
return NULL;
return packet->u.data + offset;
}
Expand Down

0 comments on commit af2bacc

Please sign in to comment.