Skip to content

Commit

Permalink
Fixed infinite loop in DeflateStream::read(buf, count), when called w…
Browse files Browse the repository at this point in the history
…ith too large buffer, as for example does DataStream::getAsString()
  • Loading branch information
eugenegff committed Feb 28, 2024
1 parent 5270e7d commit 4996577
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OgreMain/src/OgreDeflate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ namespace Ogre
mZStream->next_in = mTmp;
}

if( mZStream->avail_in )
if( mZStream->avail_in || mZStream->avail_out )
{
const uint32 availpre = mZStream->avail_out;
const int status = inflate( mZStream, Z_SYNC_FLUSH );
Expand Down

0 comments on commit 4996577

Please sign in to comment.