mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-28 22:50:18 +02:00
* Fix from henrique Werlang to fix bug ID 37672, reading too big resource stream
This commit is contained in:
parent
33ba240af3
commit
64419cbd51
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user