PR28250, Null pointer dereference in debug_class_type_samep
authorAlan Modra <amodra@gmail.com>
Wed, 1 Sep 2021 00:36:08 +0000 (10:06 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 1 Sep 2021 00:38:29 +0000 (10:08 +0930)
Typo fix, obviously should be m1->variants != NULL, not
m1->variants == NULL.

PR 28250
* debug.c (debug_class_type_samep): Correct m1->variants test.

binutils/debug.c

index 93887374d15dd87ef0844ba8dda2fdad3cee4186..9d60d154f04fbccf903de2a9519eca51c348215e 100644 (file)
@@ -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;