mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Fix bounds check in PageAllocator.Free
This commit is contained in:
1 parent
5ce78b3c53
commit
6f25c6e862
1 file changed
+1
-1
@@ -92,7 +92,7 @@ namespace BepInEx.IL2CPP.Hook.Allocator
|
||||
foreach (var allocatedChunk in allocatedChunks)
|
||||
{
|
||||
long index = (page - allocatedChunk.BaseAddress) / PAGE_SIZE;
|
||||
if (index < 0 || index > PAGES_PER_UNIT)
|
||||
if (index < 0 || index >= PAGES_PER_UNIT)
|
||||
continue;
|
||||
allocatedChunk.Pages[index] = false;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user