diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-13 01:41:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-13 01:41:23 +0200 |
commit | 011e3c63251be832d23df9f0697626ab7b354d02 (patch) | |
tree | 2cad5b58c274c93ae49d9b58fb15d784d4dfd78f /net/wireless/wext-core.c | |
parent | net/ipv6/exthdrs.c: Strict PadN option checking (diff) | |
parent | Merge branch 'akpm' (Andrew's patch-bomb) (diff) | |
download | linux-011e3c63251be832d23df9f0697626ab7b354d02.tar.xz linux-011e3c63251be832d23df9f0697626ab7b354d02.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/wireless/wext-core.c')
-rw-r--r-- | net/wireless/wext-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 9f544c95171c..22adfebaad27 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -781,8 +781,10 @@ static int ioctl_standard_iw_point(struct iw_point *iwp, unsigned int cmd, if (cmd == SIOCSIWENCODEEXT) { struct iw_encode_ext *ee = (void *) extra; - if (iwp->length < sizeof(*ee) + ee->key_len) - return -EFAULT; + if (iwp->length < sizeof(*ee) + ee->key_len) { + err = -EFAULT; + goto out; + } } } |