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:
Martin 2024-04-06 15:13:23 +02:00
parent a8651246a0
commit b38dcaebfc

View File

@ -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;