Search Linux Wireless

Re: [PATCH v1] libertas: avoid potential null-pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 8, 2015 at 1:18 AM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> We have to check pointer before dereferencing it.

It seems it's correct in initial form. Discard this and sorry for noise.

>
> Reported-by: Andrey Karpov <karpov@xxxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> ---
>  drivers/net/wireless/libertas/cfg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
> index 34f09ef..1d335e6 100644
> --- a/drivers/net/wireless/libertas/cfg.c
> +++ b/drivers/net/wireless/libertas/cfg.c
> @@ -1109,7 +1109,7 @@ static int lbs_associate(struct lbs_private *priv,
>         size_t len, resp_ie_len;
>         int status;
>         int ret;
> -       u8 *pos = &(cmd->iebuf[0]);
> +       u8 *pos;
>         u8 *tmp;
>
>         lbs_deb_enter(LBS_DEB_CFG80211);
> @@ -1138,6 +1138,8 @@ static int lbs_associate(struct lbs_private *priv,
>         cmd->listeninterval = cpu_to_le16(MRVDRV_DEFAULT_LISTEN_INTERVAL);
>         cmd->capability = cpu_to_le16(bss->capability);
>
> +       pos = cmd->iebuf;
> +
>         /* add SSID TLV */
>         rcu_read_lock();
>         ssid_eid = ieee80211_bss_get_ie(bss, WLAN_EID_SSID);
> --
> 1.8.3.101.g727a46b
>



-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux