Ver Fonte

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 há 10 anos atrás
pai
commit
4e0c77fcf4
1 ficheiros alterados com 2 adições e 0 exclusões
  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);