mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* some potential rangecheck errors fixed, Mantis #22933, suggested fixes
by Anton git-svn-id: trunk@22499 -
This commit is contained in:
parent
37ed624706
commit
5866e2435c
@ -821,7 +821,8 @@ begin
|
||||
if CopyLastWordCharCount > 0 then
|
||||
Result := Copy(ALastWord, 1, CopyLastWordCharCount);
|
||||
SetLength(Result, (WordLength-1) + CopyLastWordCharCount);
|
||||
FStream.Read(Result[1+CopyLastWordCharCount], WordLength-1);
|
||||
if WordLength > 1 then
|
||||
FStream.Read(Result[1+CopyLastWordCharCount], WordLength-1);
|
||||
end;
|
||||
|
||||
function TChmSearchReader.ReadIndexNodeEntry (ALastWord: String; out AWord: String; out
|
||||
|
@ -277,7 +277,7 @@ procedure TChmReader.ReadCommonData;
|
||||
repeat
|
||||
Stream.Read(buf, 50);
|
||||
Result := Result + buf;
|
||||
until Pos(#0, buf) > -1;
|
||||
until IndexByte(buf, 50, 0) <> -1;
|
||||
if FixURL then
|
||||
Result := StringReplace(Result, '\', '/', [rfReplaceAll]);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user