Browse Source

read_record_fields: fix overflows of variant record size variables

Could happen in case of > 32 bit variant parts, or variant parts at offsets
> 32 bit offsets.

Fixes webtbs/tw9039c with a compiler compiled with -Cr
Jonas Maebe 3 years ago
parent
commit
60b0bc5535
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/pdecvar.pas

+ 1 - 1
compiler/pdecvar.pas

@@ -1679,7 +1679,7 @@ implementation
          hdef,casetype : tdef;
          { maxsize contains the max. size of a variant }
          { startvarrec contains the start of the variant part of a record }
-         maxsize, startvarrecsize : longint;
+         maxsize, startvarrecsize : asizeint;
          usedalign,
          maxalignment,startvarrecalign,
          maxpadalign, startpadalign: shortint;