diff --git a/Core/HLE/sceDeflt.cpp b/Core/HLE/sceDeflt.cpp index b2c29ea2f1..fdf7b0d55c 100644 --- a/Core/HLE/sceDeflt.cpp +++ b/Core/HLE/sceDeflt.cpp @@ -38,7 +38,8 @@ static int CommonDecompress(int windowBits, u32 OutBuffer, int OutBufferLength, z_stream stream{}; u8 *outBufferPtr = Memory::GetPointer(OutBuffer); stream.next_in = (Bytef*)Memory::GetPointer(InBuffer); - stream.avail_in = (uInt)OutBufferLength; + // We don't know the available length, just let it use as much as it wants. + stream.avail_in = (uInt)Memory::ValidSize(InBuffer, Memory::g_MemorySize); stream.next_out = outBufferPtr; stream.avail_out = (uInt)OutBufferLength;