This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] avoid crash with objdump -P
- From: Nickolai Zeldovich <nickolai at csail dot mit dot edu>
- To: binutils at sourceware dot org
- Cc: nickolai at csail dot mit dot edu
- Date: Wed, 16 Jan 2013 19:49:28 -0500 (EST)
- Subject: [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;