This is the mail archive of the
mailing list for the binutils project.
Re: CORE for which "readelf" and "objdump" fails - second attempt wi th CORE being "gzipped"
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: ap80 at lucent dot com
- Cc: binutils at sources dot redhat dot com
- Date: 16 Apr 2002 15:43:01 +0100
- Subject: Re: CORE for which "readelf" and "objdump" fails - second attempt wi th CORE being "gzipped"
- References: <C77B73BC1A3ED4118C2000508BAD8A7C0289C62D@ma8117exch001u.bos.ascend.com>
OK - I have had a look at your core file. The patch below will
prevent readelf from core dumping, The choice of 255 as a maximum
name length is arbitrary, but I think that it should be reasonable.
In the future though, please take more care in posting to this
list. A 118K email message containing a core file is not something
that most people will want to download.
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.154
diff -c -3 -p -w -r1.154 readelf.c
*** binutils/readelf.c 21 Mar 2002 05:00:58 -0000 1.154
--- binutils/readelf.c 16 Apr 2002 14:39:12 -0000
*************** process_corefile_note_segment (file, off
*** 9450,9455 ****
--- 9437,9449 ----
inote.descdata = inote.namedata + align_power (inote.namesz, 2);
inote.descpos = offset + (inote.descdata - (char *) pnotes);
+ if (inote.namesz > 255)
+ warn (_("corrupt inote found at offset %x, namesz = %x\n"),
+ external, inote.namesz);
external = (Elf_External_Note *)(inote.descdata + align_power (inote.descsz, 2));
/* Verify that name is null terminated. It appears that at least