[binutils-gdb] PR25840, Null pointer dereference in objdump
Alan Modra
amodra@sourceware.org
Fri Apr 17 01:30:13 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ca3f923f82a079dcf441419f4a50a50f8b4b33c2
commit ca3f923f82a079dcf441419f4a50a50f8b4b33c2
Author: Alan Modra <amodra@gmail.com>
Date: Fri Apr 17 10:38:16 2020 +0930
PR25840, Null pointer dereference in objdump
PR 25840
* debug.c (debug_class_type_samep): Don't segfault on NULL type.
Diff:
---
binutils/ChangeLog | 5 +++++
binutils/debug.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3d83813f296..5c9c18bd52e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-17 Alan Modra <amodra@gmail.com>
+
+ PR 25840
+ * debug.c (debug_class_type_samep): Don't segfault on NULL type.
+
2020-04-16 Alan Modra <amodra@gmail.com>
* doc/binutils.texi: Mention --no-show-raw-insn in objdump
diff --git a/binutils/debug.c b/binutils/debug.c
index 022fa4edffb..5470e155edc 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -3277,6 +3277,8 @@ debug_class_type_samep (struct debug_handle *info, struct debug_type_s *t1,
names, since that sometimes fails in the presence of
typedefs and we really don't care. */
if (strcmp (f1->name, f2->name) != 0
+ || f1->type == NULL
+ || f2->type == NULL
|| ! debug_type_samep (info,
debug_get_real_type ((void *) info,
f1->type, NULL),
More information about the Binutils-cvs
mailing list