mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed some edge cases in write-past-end detection
This commit is contained in:
parent
fd92b4ba93
commit
53376f3861
2 changed files with 3 additions and 2 deletions
|
@ -632,7 +632,7 @@ void BfRawFree(void* ptr)
|
|||
}
|
||||
|
||||
int markOffset = *markOffsetPtr;
|
||||
if ((markOffset < 2) || (markOffset >= allocSize) || (markOffset >= kPageSize) ||
|
||||
if ((markOffset < 2) || (markOffset >= allocSize) || (markOffset > kPageSize + 2) ||
|
||||
(*(uint16*)((uint8*)markOffsetPtr - markOffset) != 0xBFBF))
|
||||
{
|
||||
int requestedSize = (uint8*)markOffsetPtr - (uint8*)ptr - markOffset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue