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] avoid crash with objdump -P


This patch fixes the following crash due to a NULL pointer dereference on a Linux machine:

% objdump -P foo /bin/ls

  /bin/ls:     file format elf64-x86-64
  Segmentation fault
  %

Nickolai.

--- binutils-2.23.51.0.8/binutils/objdump.c	2012-12-21 14:40:41.000000000 -0500
+++ binutils-2.23.51.0.8/binutils/objdump.c	2013-01-16 19:45:12.722118886 -0500
@@ -2651,7 +2651,7 @@
     if ((*desc)->filter (abfd))
       break;

-  if (desc == NULL)
+  if (*desc == NULL)
     {
       non_fatal (_("option -P/--private not supported by this file"));
       return;


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