You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subprocedure CheckBuffer in procedure ReadLn (unit QLexLib) doesn't take into
account SizeOf(Char) when checking buffer size and allocating buffer. Existing
procedure should be changed to
procedure CheckBuffer;
begin
repeat
//we need to take into account size of char - we are increasing
//position in stream by SizeOf(char) and not by a byte
if (i * SizeOf(Char)) >= (BufSize - SizeOf(Char)) then
//(- SizeOf(Char) is needed if BufSize is odd number and
//GetMem works in chunks of 1 byte
begin
BufSize := max (BufSize * 2, 256);
ReallocMem (Buf, BufSize);
end;
until (i * SizeOf(Char)) < (BufSize - SizeOf(Char));
end;
Original issue reported on code.google.com by greg....@gmail.com on 27 Jul 2010 at 10:48
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
greg....@gmail.com
on 27 Jul 2010 at 10:48The text was updated successfully, but these errors were encountered: