OSDN Git Service

2007-07-31 Michael Snyder <msnyder@access-company.com>
authormsnyder <msnyder>
Wed, 1 Aug 2007 19:43:08 +0000 (19:43 +0000)
committermsnyder <msnyder>
Wed, 1 Aug 2007 19:43:08 +0000 (19:43 +0000)
* cp-demangle.c (d_print_comp): Guard against null.

libiberty/ChangeLog
libiberty/cp-demangle.c

index c1ef6d1..aee3cc7 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-31  Michael Snyder  <msnyder@access-company.com>
+
+       * cp-demangle.c (d_print_comp): Guard against null.
+
 2007-07-25  Ben Elliston  <bje@au.ibm.com>
 
        * Makefile.in (CFILES): Remove ternary.c.
index 992b358..e4869f0 100644 (file)
@@ -2912,6 +2912,12 @@ d_print_comp (struct d_print_info *dpi,
            typed_name = d_left (typed_name);
          }
 
+       if (typed_name == NULL)
+         {
+           d_print_error (dpi);
+           return;
+         }
+
        /* If typed_name is a template, then it applies to the
           function type as well.  */
        if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE)