From: Dan Williams <dcbw@redhat.com>
To: Sven Neumann <s.neumann@raumfeld.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] libertas: fix potential NULL-pointer dereference
Date: Thu, 09 Dec 2010 10:18:52 -0600 [thread overview]
Message-ID: <1291911533.11613.0.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1291883916.1924.0.camel@sven>
On Thu, 2010-12-09 at 09:38 +0100, Sven Neumann wrote:
> The code wants to check if there's a channel and it is not disabled,
> but it used to check if channel is not NULL and accessed the channel
> struct if this check failed.
>
> Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Dan Williams <dcbw@redhat.com>
> ---
> drivers/net/wireless/libertas/cfg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
> index 373930a..113f4f2 100644
> --- a/drivers/net/wireless/libertas/cfg.c
> +++ b/drivers/net/wireless/libertas/cfg.c
> @@ -619,7 +619,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
> print_ssid(ssid_buf, ssid, ssid_len),
> LBS_SCAN_RSSI_TO_MBM(rssi)/100);
>
> - if (channel ||
> + if (channel &&
> !(channel->flags & IEEE80211_CHAN_DISABLED))
> cfg80211_inform_bss(wiphy, channel,
> bssid, le64_to_cpu(*(__le64 *)tsfdesc),
prev parent reply other threads:[~2010-12-09 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 8:38 [PATCH] libertas: fix potential NULL-pointer dereference Sven Neumann
2010-12-09 16:18 ` Dan Williams [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=1291911533.11613.0.camel@dcbw.foobar.com \
--to=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=s.neumann@raumfeld.com \
/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;
as well as URLs for NNTP newsgroup(s).