mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 05:49:15 +02:00
Ensure bufOffset calculation cannot result in a negative value
This commit is contained in:
parent
11682281de
commit
f515d77c42
@ -1811,7 +1811,7 @@ begin
|
||||
// TODO: Check if AnAddr is at lower address than length(CodeBin)
|
||||
// and ensure ReadData size doesn't exceed available target memory.
|
||||
// Fill out of bounds memory in buffer with "safe" value e.g. 0
|
||||
if sz + ADisassembler.MaxInstructionSize > AnAddr then
|
||||
if sz > AnAddr then
|
||||
begin
|
||||
FillByte(CodeBin[0], sz, 0);
|
||||
// offset into buffer where active memory should start
|
||||
|
Loading…
Reference in New Issue
Block a user