Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: msnyder@sonic.net
To: msnyder@sonic.net, gdb-patches@sourceware.org
Subject: Re: [PATCH] null pointer guard, target-descriptions.c
Date: Tue, 03 Jul 2007 00:40:00 -0000	[thread overview]
Message-ID: <5627.12.7.175.2.1183423212.squirrel@webmail.sonic.net> (raw)
In-Reply-To: <20070701160007.GG10872@caradoc.them.org>

> On Thu, Jun 28, 2007 at 02:01:03PM -0700, Michael Snyder wrote:
>> Possible null pointer ref, flagged by Coverity
>>
>
>> 2007-06-28  Michael Snyder  <msnyder@access-company.com>
>>
>> 	* target-descriptions.c (tdesc-_named_type): Guard against null
>> 	type-id argument which may be passed by tdesc_create_reg (Coverity).
>
> Whoops, yeah - this one's my fault.  There's another place in the same
> file which will crash if reg->type == NULL.  How about we never set it
> to NULL instead?  Like below.

That certainly solves the issue for now -- since it's only called
from one place -- but if we just went ahead and checked it for null,
we wouldn't have to worry about it coming up again.

But it's your code, so your choice...  if you prefer your patch,
consider this approval.  ;-)




  reply	other threads:[~2007-07-03  0:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 21:12 msnyder
2007-07-01 16:00 ` Daniel Jacobowitz
2007-07-03  0:40   ` msnyder [this message]
2007-07-03  1:23     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5627.12.7.175.2.1183423212.squirrel@webmail.sonic.net \
    --to=msnyder@sonic.net \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox