Article View: gnu.gdb.bug
Article #10111coff long filenames
From: Jay Norwood
Date: Wed, 16 May 1990 19:53
Date: Wed, 16 May 1990 19:53
13 lines
1283 bytes
1283 bytes
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
Technical Details
Message-ID:
<9005161953.AA11842@ray.sun.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!oakhill!ray!jayShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,203f1c08daa52020,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1990-05-16 15:09:10 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!CS.UTEXAS.EDU!oakhill!ray!jay From: oakhill!ray!jay@CS.UTEXAS.EDU (Jay Norwood) Newsgroups: gnu.gdb.bug Subject: coff long filenames Message-ID: <9005161953.AA11842@ray.sun.com> Date: 16 May 90 19:53:28 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 13 Posted: Wed May 16 20:53:28 1990