* Fix from henrique Werlang to fix bug ID 37672, reading too big resource stream

This commit is contained in:
michael 2020-09-02 22:10:36 +00:00
parent 33ba240af3
commit 64419cbd51

View File

@ -9858,6 +9858,7 @@ begin
FPos := 0;
FBufLen := CharsRead;
FEofReached:=CharsRead = 0;
FBuf[CharsRead] := #0;
end;
procedure TParser.CheckLoadBuffer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
@ -10122,7 +10123,7 @@ end;
constructor TParser.Create(Stream: TStream);
begin
fStream:=Stream;
SetLength(fBuf,ParseBufSize);
SetLength(fBuf,Succ(ParseBufSize));
fBufLen:=0;
fPos:=0;
fDeltaPos:=1;