diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-09-05 00:07:07 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-09-05 00:07:07 +0000 |
commit | 7d63ec12b1a2ee139aa79364d39e698b235c3ebb (patch) | |
tree | 24ba62ccd2f785e6c62016f96f7d8a60ab2e35fc /gdb | |
parent | 8fb822e099bd9e67a9bac094852e9bce15ceb175 (diff) | |
download | gdb-7d63ec12b1a2ee139aa79364d39e698b235c3ebb.zip gdb-7d63ec12b1a2ee139aa79364d39e698b235c3ebb.tar.gz gdb-7d63ec12b1a2ee139aa79364d39e698b235c3ebb.tar.bz2 |
2007-09-04 Michael Snyder <msnyder@access-company.com>
* gnu-v2-abi.c (gnuv2_value_rtti_type): Guard against null.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/gnu-v2-abi.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b52ca0..848041a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-09-04 Michael Snyder <msnyder@access-company.com> + * gnu-v2-abi.c (gnuv2_value_rtti_type): Guard against null. + * stabsread.c (patch_block_status): Guard against null. * Makefile.in (stabsread.o): Depend on gdb_assert.h. diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c index def2911..2d76f97 100644 --- a/gdb/gnu-v2-abi.c +++ b/gdb/gnu-v2-abi.c @@ -192,7 +192,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) CORE_ADDR vtbl; struct minimal_symbol *minsym; struct symbol *sym; - char *demangled_name; + char *demangled_name, *p; struct type *btype; if (full) @@ -252,7 +252,9 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc) /* If we just skip the prefix, we get screwed by namespaces */ demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI); - *(strchr(demangled_name,' '))=0; + p = strchr (demangled_name, ' '); + if (p) + *p = '\0'; /* Lookup the type for the name */ /* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */ |