2007-09-04 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 5 Sep 2007 00:07:07 +0000 (00:07 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 5 Sep 2007 00:07:07 +0000 (00:07 +0000)
* gnu-v2-abi.c (gnuv2_value_rtti_type): Guard against null.

gdb/ChangeLog
gdb/gnu-v2-abi.c

index 1b52ca0fadd30e9f43dc46960310c20cc41f9aef..848041a931a12399aa2394380228c05b3770fcd4 100644 (file)
@@ -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.
 
index def29118245cf94e593f7eb92c43d57cf6aa87bc..2d76f975605b2d2c345d9da7257cb716434e2e9f 100644 (file)
@@ -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. */
This page took 0.060737 seconds and 4 git commands to generate.