aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-01 19:43:08 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-01 19:43:08 +0000
commit168b82983a94882e0c0dfbabf6ef40f521b6b7bd (patch)
tree35afc64c306a068771c17674f3f5f21d33c66bc4 /libiberty/cp-demangle.c
parent43ec5bc0d7e868bf8f7950c21597b49090e798d2 (diff)
downloadgdb-168b82983a94882e0c0dfbabf6ef40f521b6b7bd.zip
gdb-168b82983a94882e0c0dfbabf6ef40f521b6b7bd.tar.gz
gdb-168b82983a94882e0c0dfbabf6ef40f521b6b7bd.tar.bz2
2007-07-31 Michael Snyder <msnyder@access-company.com>
* cp-demangle.c (d_print_comp): Guard against null.
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 992b358..e4869f0 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -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)