diff options
author | Ladislav Zezula <ladislav.zezula@avg.com> | 2014-01-14 12:07:53 +0100 |
---|---|---|
committer | Ladislav Zezula <ladislav.zezula@avg.com> | 2014-01-14 12:07:53 +0100 |
commit | f18f3b4a3917c8d74186f535a30b4f9dffad7afb (patch) | |
tree | 84b9268b90caa9b4e3f1ceb0c1bc7bd8b8b0f406 /test | |
parent | 48dbf357a334725059dd7ab12c4af041417e4dc4 (diff) |
+ Fixed cases with invalid block table size
Diffstat (limited to 'test')
-rw-r--r-- | test/Test.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/Test.cpp b/test/Test.cpp index a82a6e1..e0ad262 100644 --- a/test/Test.cpp +++ b/test/Test.cpp @@ -2269,6 +2269,12 @@ static int TestOpenArchive(const char * szPlainName, const char * szListFile = N return nError; } +static int TestOpenArchive_WillFail(const char * szPlainName, const char * szListFile = NULL) +{ + TestOpenArchive(szPlainName, szListFile); + return ERROR_SUCCESS; +} + static int TestOpenArchive_Corrupt(const char * szPlainName) { TLogHelper Logger("OpenCorruptMpqTest", szPlainName); @@ -3511,7 +3517,7 @@ int main(int argc, char * argv[]) if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2011_v4_InvalidHetEntryCount.MPQ"); - // Open an truncated archive + // Open a truncated archive if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2002_v1_BlockTableCut.MPQ"); @@ -3561,7 +3567,7 @@ int main(int argc, char * argv[]) // Open the multi-file archive with wrong prefix to see how StormLib deals with it if(nError == ERROR_SUCCESS) - nError = TestOpenArchive("flat-file://streaming/model.MPQ.0"); + nError = TestOpenArchive_WillFail("flat-file://streaming/model.MPQ.0"); // Open an archive that is merged with multiple files if(nError == ERROR_SUCCESS) |