From: Michael Snyder Date: Wed, 5 Sep 2007 00:14:02 +0000 (+0000) Subject: 2007-09-04 Michael Snyder X-Git-Tag: gdb_6_7-2007-09-07-branchpoint~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcd776e5474bde02e7555b33ef57905eae0f7d3e;p=platform%2Fupstream%2Fbinutils.git 2007-09-04 Michael Snyder * expprint.c (print_subexp_standard): Check strchr for null. * Makefile.in (expprint.o): Depend on gdb_assert.h. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 848041a..a26e493 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2007-09-04 Michael Snyder + * expprint.c (print_subexp_standard): Check strchr for null. + * Makefile.in (expprint.o): Depend on gdb_assert.h. + * gnu-v2-abi.c (gnuv2_value_rtti_type): Guard against null. * stabsread.c (patch_block_status): Guard against null. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 7ddf098..c740831 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1995,7 +1995,7 @@ exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ $(xcoffsolib_h) $(observer_h) expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ - $(gdb_string_h) $(block_h) $(objfiles_h) + $(gdb_string_h) $(block_h) $(objfiles_h) $(gdb_assert_h) fbsd-nat.o: fbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) \ $(regset_h) $(gdb_assert_h) $(gdb_string_h) $(elf_bfd_h) \ $(fbsd_nat_h) diff --git a/gdb/expprint.c b/gdb/expprint.c index 1dba437..6f1fcbf 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -30,6 +30,7 @@ #include "gdb_string.h" #include "block.h" #include "objfiles.h" +#include "gdb_assert.h" #ifdef HAVE_CTYPE_H #include @@ -212,6 +213,7 @@ print_subexp_standard (struct expression *exp, int *pos, for (tem = 0; tem < nargs; tem++) { nextS = strchr (s, ':'); + gdb_assert (nextS); /* Make sure we found ':'. */ *nextS = '\0'; fprintf_unfiltered (stream, " %s: ", s); s = nextS + 1;