aboutsummaryrefslogtreecommitdiff
path: root/binutils/debug.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-09-01 10:06:08 +0930
committerAlan Modra <amodra@gmail.com>2021-09-01 10:08:29 +0930
commit64cb17196c7b2365ec152991235e686e6dc27a18 (patch)
tree0e8120a9b41002bc0ebca8e57b3adf957390db20 /binutils/debug.c
parentbb1fcfc4b3e2cea7ba9cf23b6e73c58d57b211a0 (diff)
downloadgdb-64cb17196c7b2365ec152991235e686e6dc27a18.zip
gdb-64cb17196c7b2365ec152991235e686e6dc27a18.tar.gz
gdb-64cb17196c7b2365ec152991235e686e6dc27a18.tar.bz2
PR28250, Null pointer dereference in debug_class_type_samep
Typo fix, obviously should be m1->variants != NULL, not m1->variants == NULL. PR 28250 * debug.c (debug_class_type_samep): Correct m1->variants test.
Diffstat (limited to 'binutils/debug.c')
-rw-r--r--binutils/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/debug.c b/binutils/debug.c
index 9388737..9d60d15 100644
--- a/binutils/debug.c
+++ b/binutils/debug.c
@@ -3334,7 +3334,7 @@ debug_class_type_samep (struct debug_handle *info, struct debug_type_s *t1,
|| strcmp (m1->name, m2->name) != 0
|| (m1->variants == NULL) != (m2->variants == NULL))
return false;
- if (m1->variants == NULL)
+ if (m1->variants != NULL)
{
struct debug_method_variant_s **pv1, **pv2;