Ver Fonte

Merge pull request #1639 from Azaezel/StreamOverflow

corrects safety check for Stream::readLongString
Areloch há 9 anos atrás
pai
commit
236edb3384
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Engine/source/core/stream/stream.cpp

+ 1 - 1
Engine/source/core/stream/stream.cpp

@@ -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;