mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 06:49:08 +02:00
* prevent overflow in record size
git-svn-id: trunk@8428 -
This commit is contained in:
parent
b36a06e4d4
commit
fcfe1b24b4
@ -159,7 +159,7 @@ implementation
|
||||
varvaluedata:array[0..maxdata+256] of char;
|
||||
varptr:Pchar;
|
||||
varidx : byte;
|
||||
len:cardinal;
|
||||
len:longint;
|
||||
r:Pchar;
|
||||
|
||||
begin
|
||||
@ -374,7 +374,10 @@ implementation
|
||||
inc(state^.stabsize,strlen(newrec));
|
||||
freemem(newrec);
|
||||
{This should be used for case !!}
|
||||
inc(state^.recoffset,Tfieldvarsym(p).vardef.size);
|
||||
if int64(state^.recoffset)+Tfieldvarsym(p).vardef.size>high(longint) then
|
||||
state^.recoffset:=high(longint)
|
||||
else
|
||||
inc(state^.recoffset,Tfieldvarsym(p).vardef.size);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user