aboutsummaryrefslogtreecommitdiff
path: root/src/FileStream.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2024-04-21 22:35:07 +0200
committerGitHub <noreply@github.com>2024-04-21 22:35:07 +0200
commit3b65b373bc822a0ee0410edb80fa4ecfc0b454da (patch)
tree6d46b40a782aa282e60b3e9583d5a9120287c3b3 /src/FileStream.cpp
parent605222393594f5885b877bfc0086dae756674965 (diff)
parent7250eca739f060dd6984b9ea74a9fbb8b0a7c353 (diff)
Merge pull request #346 from ladislav-zezula/LZ_GabeShermanFoundBugs
Fixed bugs found by Gabe Sherman
Diffstat (limited to 'src/FileStream.cpp')
-rw-r--r--src/FileStream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FileStream.cpp b/src/FileStream.cpp
index bc5618e..b66098c 100644
--- a/src/FileStream.cpp
+++ b/src/FileStream.cpp
@@ -1198,7 +1198,7 @@ static bool FlatStream_LoadBitmap(TBlockStream * pStream)
BSWAP_ARRAY32_UNSIGNED((LPDWORD)(&Footer), sizeof(FILE_BITMAP_FOOTER));
// Verify if there is actually a footer
- if(Footer.Signature == ID_FILE_BITMAP_FOOTER && Footer.Version == 0x03)
+ if(Footer.Signature == ID_FILE_BITMAP_FOOTER && Footer.Version == 0x03 && Footer.BlockSize != 0)
{
// Get the offset of the bitmap, number of blocks and size of the bitmap
ByteOffset = MAKE_OFFSET64(Footer.MapOffsetHi, Footer.MapOffsetLo);