* [patch] stabsread, guard against null.
@ 2007-08-29 21:20 msnyder
2007-09-04 14:01 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: msnyder @ 2007-08-29 21:20 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 47 bytes --]
If strchr returns null, we're going to crash.
[-- Attachment #2: 113.txt --]
[-- Type: text/plain, Size: 835 bytes --]
2007-08-29 Michael Snyder <msnyder@access-company.com>
* stabsread.c (patch_block_status): Guard against null.
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.97
diff -p -r1.97 stabsread.c
*** stabsread.c 23 Aug 2007 18:08:38 -0000 1.97
--- stabsread.c 29 Aug 2007 21:18:10 -0000
***************
*** 45,50 ****
--- 45,51 ----
#include "doublest.h"
#include "cp-abi.h"
#include "cp-support.h"
+ #include "gdb_assert.h"
#include <ctype.h>
*************** patch_block_stabs (struct pending *symbo
*** 359,364 ****
--- 360,366 ----
{
name = stabs->stab[ii];
pp = (char *) strchr (name, ':');
+ gdb_assert (pp); /* Must find a ':' or game's over. */
while (pp[1] == ':')
{
pp += 2;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] stabsread, guard against null.
2007-08-29 21:20 [patch] stabsread, guard against null msnyder
@ 2007-09-04 14:01 ` Joel Brobecker
2007-09-05 0:01 ` msnyder
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2007-09-04 14:01 UTC (permalink / raw)
To: msnyder; +Cc: gdb-patches
Hello Michael,
> 2007-08-29 Michael Snyder <msnyder@access-company.com>
>
> * stabsread.c (patch_block_status): Guard against null.
This patch looks good, except...
> #include "cp-support.h"
> + #include "gdb_assert.h"
You need to update Makefile.in as well.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] stabsread, guard against null.
2007-09-04 14:01 ` Joel Brobecker
@ 2007-09-05 0:01 ` msnyder
0 siblings, 0 replies; 3+ messages in thread
From: msnyder @ 2007-09-05 0:01 UTC (permalink / raw)
To: Joel Brobecker; +Cc: msnyder, gdb-patches
> Hello Michael,
>
>> 2007-08-29 Michael Snyder <msnyder@access-company.com>
>>
>> * stabsread.c (patch_block_status): Guard against null.
>
> This patch looks good, except...
>
>
>> #include "cp-support.h"
>> + #include "gdb_assert.h"
>
> You need to update Makefile.in as well.
Done, and committed. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-05 0:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 21:20 [patch] stabsread, guard against null msnyder
2007-09-04 14:01 ` Joel Brobecker
2007-09-05 0:01 ` msnyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox