Add some checks to prevent overruns on broken input.

This commit is contained in:
Joachim Bauch
2015-12-20 21:26:29 +01:00
parent 9df6e7dc93
commit bc04853584
6 changed files with 80 additions and 26 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ void LoadFromMemory(void)
assert(read == static_cast<size_t>(size));
fclose(fp);
handle = MemoryLoadLibrary(data);
handle = MemoryLoadLibrary(data, size);
if (handle == NULL)
{
_tprintf(_T("Can't load library from memory.\n"));