Re: [PATCH v2 01/16] wl1251: fix scan behaviour while notassociated

From: Pavel Machek
Date: Tue Dec 10 2013 - 04:25:41 EST


Hi!

> diff --git a/drivers/net/wireless/ti/wl1251/cmd.c b/drivers/net/wireless/ti/wl1251/cmd.c
> index 6822b84..16b6479 100644
> --- a/drivers/net/wireless/ti/wl1251/cmd.c
> +++ b/drivers/net/wireless/ti/wl1251/cmd.c
> @@ -410,7 +411,10 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
> struct wl1251_cmd_scan *cmd;
> int i, ret = 0;
>
> - wl1251_debug(DEBUG_CMD, "cmd scan");
> + wl1251_debug(DEBUG_CMD, "cmd scan channels %d ssid(%d) '%s'",
> + n_channels, (int)ssid_len, ssid);
> +
> + WARN_ON(n_channels > SCAN_MAX_NUM_OF_CHANNELS);
>

ssids can have \0s in them... and what is worse, they may not be 0
terminated AFAICT.

Potential solution is at
http://www.spinics.net/lists/linux-wireless/msg98640.html .

Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/