Fixed potential for reading out of library bounds in MemoryUtils;:FindPattern (r=asherkin).

This commit is contained in:
Nicholas Hastings 2013-01-23 14:05:35 -05:00
parent 764a04a201
commit 18285ca751

View File

@ -116,7 +116,7 @@ void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t l
}
ptr = reinterpret_cast<char *>(lib.baseAddress);
end = ptr + lib.memorySize - 1;
end = ptr + lib.memorySize - len;
while (ptr < end)
{