From: Michael Snyder Date: Wed, 1 Aug 2007 21:29:40 +0000 (+0000) Subject: * cp-demangle.c (d_print_comp): Guard against null. X-Git-Tag: releases/gcc-4.3.0~3592 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac847e32a09712fc25d668c84bcef3110aa6300b;p=thirdparty%2Fgcc.git * cp-demangle.c (d_print_comp): Guard against null. From-SVN: r127139 --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index c1ef6d12ecf9..aee3cc76f575 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2007-07-31 Michael Snyder + + * cp-demangle.c (d_print_comp): Guard against null. + 2007-07-25 Ben Elliston * Makefile.in (CFILES): Remove ternary.c. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 992b3580bf7c..e4869f029dd7 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)