lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1168944139.9175.3.camel@johannes.berg>
Date:	Tue, 16 Jan 2007 10:42:18 +0000
From:	Johannes Berg <johannes@...solutions.net>
To:	Marcus Better <marcus@...ter.se>
Cc:	netdev@...r.kernel.org, "John W. Linville" <linville@...driver.com>
Subject: Re: [PATCH] nl80211: Allocate array of pointers for nla_parse

On Tue, 2007-01-16 at 11:13 +0100, Marcus Better wrote:
> The code allocates an array of struct nlattr, but it seems to me that it should allocate an array of pointers.
> 
> Signed-off-by: Marcus Better <marcus@...ter.se>

Yup.
Acked-by: Johannes Berg <johannes@...solutions.net>

> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -843,7 +843,7 @@ static int nl80211_initiate_scan(struct sk_buff *skb, struct genl_info *info)
>  
>  		channels = kmalloc(count * sizeof(struct scan_channel),
>  				   GFP_KERNEL);
> -		tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr),
> +		tb = kmalloc((NL80211_ATTR_MAX+1) * sizeof(struct nlattr *),
>  			     GFP_KERNEL);
>  
>  		count = 0;

Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ