From 7d65d87773e3e7e587ba98a325e85d9cef621943 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Thu, 28 Jan 2016 08:56:48 +0100 Subject: + Anti-integer overflow in calculating buffer for hash table, and position of the block table entry --- test/StormTest.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index c6908dc..2926f49 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -4287,7 +4287,11 @@ int main(int argc, char * argv[]) // Open an protected map if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2015_v1_flem1.w3x"); - +*/ + // Open another protected map + if(nError == ERROR_SUCCESS) + nError = TestOpenArchive("MPQ_2016_v1_ProtectedMap_TableSizeOverflow.w3x"); +/* // Open the multi-file archive with wrong prefix to see how StormLib deals with it if(nError == ERROR_SUCCESS) nError = TestOpenArchive_WillFail("flat-file://streaming/model.MPQ.0"); @@ -4303,7 +4307,7 @@ int main(int argc, char * argv[]) // Test on an archive that has been invalidated by extending an old valid MPQ if(nError == ERROR_SUCCESS) nError = TestOpenArchive_Corrupt("MPQ_2013_vX_Battle.net.MPQ"); -*/ + // Open a patched archive if(nError == ERROR_SUCCESS) nError = TestOpenArchive_Patched(PatchList_WoW_OldWorld13286, "OldWorld\\World\\Model.blob", 2); @@ -4343,7 +4347,7 @@ int main(int argc, char * argv[]) // Open a patched archive if(nError == ERROR_SUCCESS) nError = TestOpenArchive_Patched(PatchList_HS_6898_enGB, "Hearthstone_Data\\Managed\\Assembly-Csharp.dll", 10); -/* + // Check the opening archive for read-only if(nError == ERROR_SUCCESS) nError = TestOpenArchive_ReadOnly("MPQ_1997_v1_Diablo1_DIABDAT.MPQ", true); -- cgit v1.2.3