Merge pull request #1639 from Azaezel/StreamOverflow

corrects safety check for Stream::readLongString
This commit is contained in:
Areloch 2016-06-11 02:09:55 -05:00 committed by GitHub
commit 236edb3384

View file

@ -155,7 +155,7 @@ void Stream::readLongString(U32 maxStringLen, char *stringBuf)
{ {
U32 len; U32 len;
read(&len); read(&len);
if(len > maxStringLen) if(len >= maxStringLen)
{ {
m_streamStatus = IOError; m_streamStatus = IOError;
return; return;