diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-01 21:29:40 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-01 21:29:40 +0000 |
commit | 9ec61790b41244e2de5a7cf3d16072992f592701 (patch) | |
tree | fd7aa45e02f987cfa525b5143852216b0b2a46dd /libiberty | |
parent | 59bebeca5604a61b0787d87f4ffaba6f9a73ebbe (diff) | |
download | gcc-9ec61790b41244e2de5a7cf3d16072992f592701.tar.gz |
* cp-demangle.c (d_print_comp): Guard against null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index c1ef6d12ecf..aee3cc76f57 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -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. diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 992b3580bf7..e4869f029dd 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) |