mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 20:59:36 +02:00
SynEdit: Fix crash (write incorrect memory via pointer in DoGetPhysicalCharWidths / not caught by range check) and 2ndary range-check-error, when linetext has #$00
. Issue #40873
This commit is contained in:
parent
a8651246a0
commit
b38dcaebfc
@ -1160,7 +1160,7 @@ begin
|
||||
if ALen = 0 then
|
||||
exit;
|
||||
if Length(AResult) < ALen then
|
||||
SetLength(AResult, Length(s));
|
||||
SetLength(AResult, ALen);
|
||||
DoGetPhysicalCharWidths(s, ALen, Index, @AResult[0]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user