Browse Source

check and cause an internal error in TOmfRecord_PUBDEF.EncodeTo when trying to
write a 16-bit record with an entry with public offset > $ffff

git-svn-id: trunk@30588 -

nickysn 10 years ago
parent
commit
4e0c77fcf4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/omfbase.pas

+ 2 - 0
compiler/omfbase.pas

@@ -1010,6 +1010,8 @@ implementation
             end
           else
             begin
+              if PubName.PublicOffset>$ffff then
+                internalerror(2015041403);
               RawRecord.RawData[NextOfs]:=Byte(PubName.PublicOffset);
               RawRecord.RawData[NextOfs+1]:=Byte(PubName.PublicOffset shr 8);
               Inc(NextOfs,2);