Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] ax-gdb, null ptr guard
@ 2007-07-24 20:31 msnyder
  2007-07-24 22:50 ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: msnyder @ 2007-07-24 20:31 UTC (permalink / raw)
  To: gdb-patches; +Cc: jimb

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Coverity...


[-- Attachment #2: thisname.txt --]
[-- Type: text/plain, Size: 1175 bytes --]

2007-07-24  Michael Snyder  <msnyder@access-company.com>

	* ax-gdb.c (find_field): Guard against null ptr.

Index: ax-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-gdb.c,v
retrieving revision 1.34
diff -p -r1.34 ax-gdb.c
*** ax-gdb.c	13 Jun 2007 17:11:09 -0000	1.34
--- ax-gdb.c	24 Jul 2007 20:18:36 -0000
*************** find_field (struct type *type, char *nam
*** 1172,1183 ****
      {
        char *this_name = TYPE_FIELD_NAME (type, i);
  
!       if (this_name && strcmp (name, this_name) == 0)
! 	return i;
  
!       if (this_name[0] == '\0')
! 	internal_error (__FILE__, __LINE__,
! 			_("find_field: anonymous unions not supported"));
      }
  
    error (_("Couldn't find member named `%s' in struct/union `%s'"),
--- 1172,1186 ----
      {
        char *this_name = TYPE_FIELD_NAME (type, i);
  
!       if (this_name)
! 	{
! 	  if (strcmp (name, this_name) == 0)
! 	    return i;
  
! 	  if (this_name[0] == '\0')
! 	    internal_error (__FILE__, __LINE__,
! 			    _("find_field: anonymous unions not supported"));
! 	}
      }
  
    error (_("Couldn't find member named `%s' in struct/union `%s'"),

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ax-gdb, null ptr guard
  2007-07-24 20:31 [PATCH] ax-gdb, null ptr guard msnyder
@ 2007-07-24 22:50 ` Jim Blandy
  2007-07-25  0:27   ` msnyder
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2007-07-24 22:50 UTC (permalink / raw)
  To: msnyder; +Cc: gdb-patches


msnyder@sonic.net writes:
> Coverity...

Looks good to me.  Thanks!


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ax-gdb, null ptr guard
  2007-07-24 22:50 ` Jim Blandy
@ 2007-07-25  0:27   ` msnyder
  0 siblings, 0 replies; 3+ messages in thread
From: msnyder @ 2007-07-25  0:27 UTC (permalink / raw)
  To: Jim Blandy; +Cc: msnyder, gdb-patches

>
> msnyder@sonic.net writes:
>> Coverity...
>
> Looks good to me.  Thanks!

Welcome, thanks, committed.   ;-)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-24 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-24 20:31 [PATCH] ax-gdb, null ptr guard msnyder
2007-07-24 22:50 ` Jim Blandy
2007-07-25  0:27   ` msnyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox