From: Jeff Garzik <jeff@garzik.org>
To: Micah Gruber <micah.gruber@gmail.com>
Cc: petkan@users.sourceforge.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c
Date: Mon, 30 Jul 2007 15:45:04 -0400 [thread overview]
Message-ID: <46AE3FC0.4020600@garzik.org> (raw)
In-Reply-To: <46A46160.9080508@gmail.com>
Micah Gruber wrote:
> This patch fixes a potential null dereference bug where we dereference
> pegasus before a null check. This patch simply moves the dereferencing
> after the null check.
>
> Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
>
> ---
>
> --- a/drivers/net/usb/pegasus.c
> +++ b/drivers/net/usb/pegasus.c
> @@ -768,11 +768,13 @@
> static void write_bulk_callback(struct urb *urb)
> {
> pegasus_t *pegasus = urb->context;
> - struct net_device *net = pegasus->net;
> + struct net_device *net;
>
> if (!pegasus)
> return;
>
> + net = pegasus->net;
> +
applied (manually)
prev parent reply other threads:[~2007-07-30 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 8:05 [PATCH] [2.6.22] Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c Micah Gruber
2007-07-24 12:57 ` Petko Manolov
2007-07-30 19:45 ` Jeff Garzik [this message]
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=46AE3FC0.4020600@garzik.org \
--to=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=micah.gruber@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=petkan@users.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.