summaryrefslogtreecommitdiffstats
path: root/net/mac80211/aes_ccm.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-11-19 21:38:48 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-11-19 21:38:48 +0100
commitab1f5a532c9d33b49b039660c5ecbc0ab53e7133 (patch)
treea1c1d820f2280535978632c5935462efcf5a4c7f /net/mac80211/aes_ccm.c
parentMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
parentath9k: Fix RTC_DERIVED_CLK usage (diff)
downloadlinux-ab1f5a532c9d33b49b039660c5ecbc0ab53e7133.tar.xz
linux-ab1f5a532c9d33b49b039660c5ecbc0ab53e7133.zip
Merge commit '4e6ce4dc7ce71d0886908d55129d5d6482a27ff9' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/mac80211/aes_ccm.c')
-rw-r--r--net/mac80211/aes_ccm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/aes_ccm.c b/net/mac80211/aes_ccm.c
index ec24378caaaf..09d9caaec591 100644
--- a/net/mac80211/aes_ccm.c
+++ b/net/mac80211/aes_ccm.c
@@ -53,6 +53,9 @@ int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
__aligned(__alignof__(struct aead_request));
struct aead_request *aead_req = (void *) aead_req_data;
+ if (data_len == 0)
+ return -EINVAL;
+
memset(aead_req, 0, sizeof(aead_req_data));
sg_init_one(&pt, data, data_len);