Fixed potential for reading out of library bounds in MemoryUtils;:FindPattern (r=asherkin).
This commit is contained in:
parent
764a04a201
commit
18285ca751
@ -116,7 +116,7 @@ void *MemoryUtils::FindPattern(const void *libPtr, const char *pattern, size_t l
|
|||||||
}
|
}
|
||||||
|
|
||||||
ptr = reinterpret_cast<char *>(lib.baseAddress);
|
ptr = reinterpret_cast<char *>(lib.baseAddress);
|
||||||
end = ptr + lib.memorySize - 1;
|
end = ptr + lib.memorySize - len;
|
||||||
|
|
||||||
while (ptr < end)
|
while (ptr < end)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user