aboutsummaryrefslogtreecommitdiff
path: root/src/SFileOpenFileEx.cpp
diff options
context:
space:
mode:
authorZezula Ladislav <ladislav.zezula@avast.com>2018-10-15 11:23:52 +0200
committerZezula Ladislav <ladislav.zezula@avast.com>2018-10-15 11:23:52 +0200
commitf35d106059accbddaa602b6525f9542746b2c2b7 (patch)
tree4fd9212c6d57e430076dba99936b1503f18a8919 /src/SFileOpenFileEx.cpp
parent4ad0bff21da0163917e1552960e6a43679586b89 (diff)
+ Fixed arbitrarily large allocations caused by TQMPHeader::dwBlockTableSize
Diffstat (limited to 'src/SFileOpenFileEx.cpp')
-rw-r--r--src/SFileOpenFileEx.cpp5
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)