This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH][Bug binutils/4797] SEGV fault due to NULL pointer deref in dwarf2.c
- From: "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>
- To: binutils at sourceware dot org
- Date: Tue, 17 Jul 2007 12:31:33 -0700
- Subject: [PATCH][Bug binutils/4797] SEGV fault due to NULL pointer deref in dwarf2.c
Hi
Could someone review this and check that in? Thanks.
-Doug
2007-07-17 Doug Kwan <dougkwan@google.com>
PR binutils/4797
* dwarf2.c: (find_line) Do not dereference functionname_ptr if
do_line is true.
Index: bfd/dwarf2.c
===================================================================
RCS file: /cvs/src/src/bfd/dwarf2.c,v
retrieving revision 1.97
diff -u -u -r1.97 dwarf2.c
--- bfd/dwarf2.c 3 Jul 2007 14:26:40 -0000 1.97
+++ bfd/dwarf2.c 17 Jul 2007 19:27:44 -0000
@@ -2380,7 +2380,8 @@
else
addr += section->vma;
*filename_ptr = NULL;
- *functionname_ptr = NULL;
+ if (! do_line)
+ *functionname_ptr = NULL;
*linenumber_ptr = 0;
if (! *pinfo)