diff options
author | Zezula Ladislav <ladislav.zezula@avast.com> | 2018-10-15 11:23:52 +0200 |
---|---|---|
committer | Zezula Ladislav <ladislav.zezula@avast.com> | 2018-10-15 11:23:52 +0200 |
commit | f35d106059accbddaa602b6525f9542746b2c2b7 (patch) | |
tree | 4fd9212c6d57e430076dba99936b1503f18a8919 /src/SFileOpenFileEx.cpp | |
parent | 4ad0bff21da0163917e1552960e6a43679586b89 (diff) |
+ Fixed arbitrarily large allocations caused by TQMPHeader::dwBlockTableSize
Diffstat (limited to 'src/SFileOpenFileEx.cpp')
-rw-r--r-- | src/SFileOpenFileEx.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SFileOpenFileEx.cpp b/src/SFileOpenFileEx.cpp index a25cc72..a139585 100644 --- a/src/SFileOpenFileEx.cpp +++ b/src/SFileOpenFileEx.cpp @@ -308,7 +308,10 @@ bool WINAPI SFileOpenFileEx(HANDLE hMpq, const char * szFileName, DWORD dwSearch } } - nError = ERROR_FILE_NOT_FOUND; + if(pFileEntry == NULL) + { + nError = ERROR_FILE_NOT_FOUND; + } } // Ignore unknown loading flags (example: MPQ_2016_v1_WME4_4.w3x) |