aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2024-04-21 20:21:38 +0200
committerLadislav Zezula <zezula@volny.cz>2024-04-21 20:21:38 +0200
commitc4e3490d729ba42e92803b7f2ef90ed86b0b0eca (patch)
tree4bdb5d39a85932c9be7ddb74306814d7682089f5 /test
parenta26f04c11dd86e949e649a8c0a01eeaeae268c26 (diff)
Added buffer overflow checks to the Sparse decompression (https://github.com/ladislav-zezula/StormLib/issues/337)
Diffstat (limited to 'test')
-rwxr-xr-xtest/StormTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/StormTest.cpp b/test/StormTest.cpp
index 60e2167..721ee19 100755
--- a/test/StormTest.cpp
+++ b/test/StormTest.cpp
@@ -3789,7 +3789,7 @@ static void Test_PlayingSpace()
{
HANDLE hMpq = NULL;
- if(SFileOpenArchive(_T("e:\\poc18"), 0, 0, &hMpq))
+ if(SFileOpenArchive(_T("e:\\poc21"), 0, 0, &hMpq))
{
SFileCompactArchive(hMpq, _T("e:\\Ladik\\Incoming\\poc18"), true);
SFileCloseArchive(hMpq);
@@ -4008,6 +4008,8 @@ static const TEST_INFO1 Test_OpenMpqs[] =
{_T("pocs/MPQ_2024_07_InvalidBitmapFooter.mpq"), NULL, "--------------------------------", TFLG_WILL_FAIL},
{_T("pocs/MPQ_2024_08_InvalidSectorSize.mpq"), NULL, "--------------------------------", TFLG_WILL_FAIL},
{_T("pocs/MPQ_2024_09_InvalidSectorSize.mpq"), NULL, "--------------------------------", TFLG_WILL_FAIL},
+ {_T("pocs/MPQ_2024_10_HuffDecompressError.mpq"), NULL, "--------------------------------", TFLG_WILL_FAIL},
+ {_T("pocs/MPQ_2024_10_SparseDecompressError.mpq"), NULL, "--------------------------------", TFLG_WILL_FAIL},
// Correct or damaged archives
{_T("MPQ_1997_v1_Diablo1_DIABDAT.MPQ"), NULL, "554b538541e42170ed41cb236483489e", 2910, &TwoFilesD1}, // Base MPQ from Diablo 1