diff options
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 0af7f54e4f6..af648e08e61 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -780,8 +780,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; + } } } |