From 28f0d47d831f8bf93e9f2717e3a9d95e6add6ea4 Mon Sep 17 00:00:00 2001 From: yury Date: Sun, 1 Jul 2007 19:57:09 +0000 Subject: [PATCH] * Don't be too strict while reading COFF symtable if obj file does not have COFF string table (to be compatible with LD and MS linkers). It fixes bug #9175. git-svn-id: trunk@7913 - --- compiler/ogcoff.pas | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/compiler/ogcoff.pas b/compiler/ogcoff.pas index c128e80a88..d745f52961 100644 --- a/compiler/ogcoff.pas +++ b/compiler/ogcoff.pas @@ -1775,12 +1775,7 @@ const pemagic : array[0..3] of byte = ( InputError('Error reading COFF Symtable'); exit; end; - if strsize<4 then - begin - InputError('Error reading COFF Symtable'); - exit; - end; - if not AReader.ReadArray(FCoffStrs,Strsize-4) then + if (strsize>4) and not AReader.ReadArray(FCoffStrs,Strsize-4) then begin InputError('Error reading COFF Symtable'); exit;