diff options
author | DJ Delorie <dj@redhat.com> | 2011-07-26 16:04:38 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2011-07-26 16:04:38 +0000 |
commit | 04aed65246079bfe5a72e494145772f420e4430e (patch) | |
tree | ff4b22ad791dc31033b669d9201ceddb52e85f41 /libiberty/cp-demangle.c | |
parent | 1a532630dc4d78abd1ddf6e4a97e789dad88787d (diff) | |
download | gdb-04aed65246079bfe5a72e494145772f420e4430e.zip gdb-04aed65246079bfe5a72e494145772f420e4430e.tar.gz gdb-04aed65246079bfe5a72e494145772f420e4430e.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 29badbb..f41856b 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1,5 +1,5 @@ /* Demangler for g++ V3 ABI. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@wasabisystems.com>. @@ -3306,6 +3306,7 @@ d_print_init (struct d_print_info *dpi, demangle_callbackref callback, dpi->last_char = '\0'; dpi->templates = NULL; dpi->modifiers = NULL; + dpi->pack_index = 0; dpi->flush_count = 0; dpi->callback = callback; @@ -3893,6 +3894,13 @@ d_print_comp (struct d_print_info *dpi, int options, struct demangle_component *a = d_lookup_template_argument (dpi, sub); if (a && a->type == DEMANGLE_COMPONENT_TEMPLATE_ARGLIST) a = d_index_template_argument (a, dpi->pack_index); + + if (a == NULL) + { + d_print_error (dpi); + return; + } + sub = a; } |