summaryrefslogtreecommitdiffstats
path: root/net/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-21 01:26:49 -0200
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:12:05 -0500
commit571d6eee9b5bce28fcbeb7588890ad5ca3f8c718 (patch)
tree38ad5d544dc9c14fc49a03957c24ee7a2e450b60 /net/ieee80211/ieee80211_rx.c
parent8e87295b9578fa46b5f325a7dc42ddbbdad6e0d0 (diff)
downloadlinux-571d6eee9b5bce28fcbeb7588890ad5ca3f8c718.tar.gz
linux-571d6eee9b5bce28fcbeb7588890ad5ca3f8c718.tar.bz2
linux-571d6eee9b5bce28fcbeb7588890ad5ca3f8c718.zip
[PATCH] Check ieee80211softmac_auth_resp kmalloc result
And use kmemdup and kzalloc where applicable Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/ieee80211_rx.c')
-rw-r--r--net/ieee80211/ieee80211_rx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index ce28d571afac..d97e5412e31b 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -1304,12 +1304,11 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
case MFIE_TYPE_IBSS_DFS:
if (network->ibss_dfs)
break;
- network->ibss_dfs =
- kmalloc(info_element->len, GFP_ATOMIC);
+ network->ibss_dfs = kmemdup(info_element->data,
+ info_element->len,
+ GFP_ATOMIC);
if (!network->ibss_dfs)
return 1;
- memcpy(network->ibss_dfs, info_element->data,
- info_element->len);
network->flags |= NETWORK_HAS_IBSS_DFS;
break;