* [PATCH] libertas: fix use-before-check violation
@ 2008-04-29 8:07 Holger Schurig
2008-04-30 20:21 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2008-04-29 8:07 UTC (permalink / raw)
To: John W. Linville, Dan Williams; +Cc: linux-wireless, libertas-dev
[PATCH] fix use-before-check violation
According to Coverity (kudo's to Adrian Bunk), we had one use-before-check
bug in libe libertas driver. This patch fixes this issue.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Index: wireless-testing/drivers/net/wireless/libertas/scan.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/scan.c 2008-04-29 09:07:19.000000000 +0200
+++ wireless-testing/drivers/net/wireless/libertas/scan.c 2008-04-29 09:07:39.000000000 +0200
@@ -298,7 +298,8 @@ static int lbs_do_scan(struct lbs_privat
uint8_t *tlv; /* pointer into our current, growing TLV storage area */
lbs_deb_enter_args(LBS_DEB_SCAN, "bsstype %d, chanlist[].chan %d, chan_count %d",
- bsstype, chan_list[0].channumber, chan_count);
+ bsstype, chan_list ? chan_list[0].channumber : -1,
+ chan_count);
/* create the fixed part for scan command */
scan_cmd = kzalloc(MAX_SCAN_CFG_ALLOC, GFP_KERNEL);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libertas: fix use-before-check violation
2008-04-29 8:07 [PATCH] libertas: fix use-before-check violation Holger Schurig
@ 2008-04-30 20:21 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-04-30 20:21 UTC (permalink / raw)
To: Holger Schurig; +Cc: John W. Linville, linux-wireless, libertas-dev
On Tue, 2008-04-29 at 10:07 +0200, Holger Schurig wrote:
> [PATCH] fix use-before-check violation
>
> According to Coverity (kudo's to Adrian Bunk), we had one use-before-check
> bug in libe libertas driver. This patch fixes this issue.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
> Index: wireless-testing/drivers/net/wireless/libertas/scan.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/scan.c 2008-04-29 09:07:19.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/scan.c 2008-04-29 09:07:39.000000000 +0200
> @@ -298,7 +298,8 @@ static int lbs_do_scan(struct lbs_privat
> uint8_t *tlv; /* pointer into our current, growing TLV storage area */
>
> lbs_deb_enter_args(LBS_DEB_SCAN, "bsstype %d, chanlist[].chan %d, chan_count %d",
> - bsstype, chan_list[0].channumber, chan_count);
> + bsstype, chan_list ? chan_list[0].channumber : -1,
> + chan_count);
>
> /* create the fixed part for scan command */
> scan_cmd = kzalloc(MAX_SCAN_CFG_ALLOC, GFP_KERNEL);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-30 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 8:07 [PATCH] libertas: fix use-before-check violation Holger Schurig
2008-04-30 20:21 ` Dan Williams
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).