mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* fixed bug in SysTinyGetMem that caused heap corruption if the free block that's being allocated is followed tightly by an already allocated block
git-svn-id: trunk@24520 -
This commit is contained in:
parent
9312419ce8
commit
f0ada1ccc5
@ -71,7 +71,8 @@
|
||||
|
||||
pptruint(p)^ := size;
|
||||
|
||||
InternalTinyFreeMem(pointer(ptruint(p)+AllocSize), RestSize);
|
||||
if RestSize > 0 then
|
||||
InternalTinyFreeMem(pointer(ptruint(p)+AllocSize), RestSize);
|
||||
end
|
||||
else
|
||||
Result := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user