2007-08-29 Michael Snyder * expprint.c (print_subexp_standard): Check strchr for null. Index: expprint.c =================================================================== RCS file: /cvs/src/src/gdb/expprint.c,v retrieving revision 1.29 diff -p -r1.29 expprint.c *** expprint.c 23 Aug 2007 18:08:30 -0000 1.29 --- expprint.c 29 Aug 2007 22:08:22 -0000 *************** *** 30,35 **** --- 30,36 ---- #include "gdb_string.h" #include "block.h" #include "objfiles.h" + #include "gdb_assert.h" #ifdef HAVE_CTYPE_H #include *************** print_subexp_standard (struct expression *** 212,217 **** --- 213,219 ---- 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;