mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-15 02:11:22 +00:00
Check for truncated reads when decompressing
This commit is contained in:
1 parent
edcce279d2
commit
07c9b3697b
1 file changed
+2
-2
@@ -180,7 +180,7 @@ struct CompressedFileIO
|
||||
int32_t compSize = 0;
|
||||
|
||||
FileIO::fread(&compSize, sizeof(compSize), 1, m_F);
|
||||
FileIO::fread(m_CompressBuf, 1, compSize, m_F);
|
||||
size_t numRead = FileIO::fread(m_CompressBuf, 1, compSize, m_F);
|
||||
|
||||
m_CompressedSize += compSize;
|
||||
|
||||
@@ -191,7 +191,7 @@ struct CompressedFileIO
|
||||
|
||||
if(decompSize < 0)
|
||||
{
|
||||
RDCERR("Error decompressing: %i", decompSize);
|
||||
RDCERR("Error decompressing: %i (%i / %i)", decompSize, int(numRead), compSize);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user