diff options
author | Janani Ravichandran <janani.rvchndrn@gmail.com> | 2016-02-16 17:24:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-19 17:00:07 -0800 |
commit | 3e758b278896272bb641cd9e76e8416e2ba9586e (patch) | |
tree | 66e36cf4a86211c49e2cce96fa10164cfbfa30e7 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | aae96201517678c241ea94da42a6756f80215362 (diff) | |
download | linux-3e758b278896272bb641cd9e76e8416e2ba9586e.tar.gz linux-3e758b278896272bb641cd9e76e8416e2ba9586e.tar.xz |
staging: wilc1000: Use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc for arrays to prevent integer
overflows.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 5649476fb8fd..cf351d1aa74b 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -664,7 +664,7 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) PRINT_D(CFG80211_DBG, "Number of SSIDs %d\n", request->n_ssids); if (request->n_ssids >= 1) { - strHiddenNetwork.net_info = kmalloc(request->n_ssids * sizeof(struct hidden_network), GFP_KERNEL); + strHiddenNetwork.net_info = kmalloc_array(request->n_ssids, sizeof(struct hidden_network), GFP_KERNEL); strHiddenNetwork.n_ssids = request->n_ssids; |