🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10112

Re: coff long filenames

#10112
From: Ronald Guilmette
Date: Thu, 17 May 1990 06:35
22 lines
1694 bytes
In article <9005161953.AA11842@ray.sun.com> oakhill!ray!jay@CS.UTEXAS.EDU (Jay Norwood) writes:
>I'm working with 3.5 coffread.c.  In the function getfilename, there is
>a section for reading in long filenames:
>  if (aux_entry->x_file.x_foff != 0)
>    strcpy (buffer, stringtab + aux_entry->x_file.x_foff);
>---------------
>Since the first filename symbol may very well be the first symbol
>which deposits a string in the string table (if the filename is longer
>than FILNMLEN), and since the x_foff is relative to the start of the
>string table, it is very possible to have a valid long filename at the
>same time as x_foff==0.  In other words this is a very risky test.
>Wouldn't it be better to just test x_file.x_fname[0] for a 0 in order to
>determine whether or not to use x_foff?
>Jay Norwood

I'm not 100% sure, but I seem to recall that there is some rule that says
that the first byte of the coff string table is never actually used (for
this exact reason) and so the first (valid) offset must be 1.

Can somebody verify that?

// rfg
Technical Details
Message-ID: <26524637.4041@paris.ics.uci.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!orion.oac.uci.edu!uci-ics!rfg
References: <9005161953.AA11842@ray.sun.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,203f1c08daa52020
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-05-17 03:46:38 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cs.utexas.edu!usc!orion.oac.uci.edu!uci-ics!rfg
From: rfg@ics.uci.edu (Ronald Guilmette)
Newsgroups: gnu.gdb.bug
Subject: Re: coff long filenames
Message-ID: <26524637.4041@paris.ics.uci.edu>
Date: 17 May 90 06:35:35 GMT
References: <9005161953.AA11842@ray.sun.com>
Reply-To: rfg@ics.uci.edu (Ronald Guilmette)
Distribution: gnu
Organization: UC Irvine Department of ICS
Lines: 22
Posted: Thu May 17 07:35:35 1990