Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268552
b: refs/heads/master
c: 657d1b0
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Sep 30, 2011
1 parent 6a6a235 commit 5d94682
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6835cb6b438b77ba82ad5a23944bbfb12128f5db
refs/heads/master: 657d1b0dfc97e2256257320f0818e21cf360d0ce
18 changes: 15 additions & 3 deletions trunk/drivers/staging/vt6656/wpactl.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
return ret;
}

if (param->u.wpa_key.key && param->u.wpa_key.key_len > sizeof(abyKey))
return -EINVAL;

spin_unlock_irq(&pDevice->lock);
if(param->u.wpa_key.key && fcpfkernel) {
memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
Expand Down Expand Up @@ -269,6 +272,10 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
return ret;
}


if (param->u.wpa_key.seq && param->u.wpa_key.seq_len > sizeof(abySeq))
return -EINVAL;

spin_unlock_irq(&pDevice->lock);
if(param->u.wpa_key.seq && fcpfkernel) {
memcpy(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len);
Expand Down Expand Up @@ -772,9 +779,14 @@ static int wpa_set_associate(PSDevice pDevice,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wpa_ie_len = %d\n", param->u.wpa_associate.wpa_ie_len);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming dBm = %d\n", param->u.wpa_associate.roam_dbm); //Davidwang

if (param->u.wpa_associate.wpa_ie &&
copy_from_user(&abyWPAIE[0], param->u.wpa_associate.wpa_ie, param->u.wpa_associate.wpa_ie_len))
return -EINVAL;
if (param->u.wpa_associate.wpa_ie) {
if (param->u.wpa_associate.wpa_ie_len > sizeof(abyWPAIE))
return -EINVAL;

if (copy_from_user(&abyWPAIE[0], param->u.wpa_associate.wpa_ie,
param->u.wpa_associate.wpa_ie_len))
return -EFAULT;
}

if (param->u.wpa_associate.mode == 1)
pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;
Expand Down

0 comments on commit 5d94682

Please sign in to comment.