mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 15:00:24 +02:00
LazReport: Check the length of a string before accessing its members. Issue #28896, patch from Tony Whyman.
git-svn-id: trunk@50162 -
This commit is contained in:
parent
105b3e0652
commit
dd99e47f84
@ -128,7 +128,7 @@ end;
|
||||
|
||||
procedure RemoveQuotes(var s: String);
|
||||
begin
|
||||
if (s[1] = '"') and (s[Length(s)] = '"') then
|
||||
if (Length(s) > 1) and (s[1] = '"') and (s[Length(s)] = '"') then
|
||||
s := Copy(s, 2, Length(s) - 2);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user