This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]