* [patch] expprint.c, check strchr return val for null.
@ 2007-08-29 22:10 msnyder
2007-09-04 14:30 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: msnyder @ 2007-08-29 22:10 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 110.txt --]
[-- Type: text/plain, Size: 885 bytes --]
2007-08-29 Michael Snyder <msnyder@access-company.com>
* 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 <ctype.h>
*************** 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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] expprint.c, check strchr return val for null.
2007-08-29 22:10 [patch] expprint.c, check strchr return val for null msnyder
@ 2007-09-04 14:30 ` Joel Brobecker
2007-09-05 0:13 ` msnyder
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2007-09-04 14:30 UTC (permalink / raw)
To: msnyder; +Cc: gdb-patches
> 2007-08-29 Michael Snyder <msnyder@access-company.com>
>
> * expprint.c (print_subexp_standard): Check strchr for null.
The extra assert looks good to me. But make sure to update Makefile.in
as well since you introduced a dependency on gdb_assert.h.
Thanks for all these patches!
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] expprint.c, check strchr return val for null.
2007-09-04 14:30 ` Joel Brobecker
@ 2007-09-05 0:13 ` msnyder
0 siblings, 0 replies; 3+ messages in thread
From: msnyder @ 2007-09-05 0:13 UTC (permalink / raw)
To: Joel Brobecker; +Cc: msnyder, gdb-patches
>> 2007-08-29 Michael Snyder <msnyder@access-company.com>
>>
>> * expprint.c (print_subexp_standard): Check strchr for null.
>
> The extra assert looks good to me. But make sure to update Makefile.in
> as well since you introduced a dependency on gdb_assert.h.
OK, done and committed.
> Thanks for all these patches!
My pleasure. Thanks for all the review. ;-)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-05 0:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 22:10 [patch] expprint.c, check strchr return val for null msnyder
2007-09-04 14:30 ` Joel Brobecker
2007-09-05 0:13 ` msnyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox