Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281181
b: refs/heads/master
c: 2a58b19
h: refs/heads/master
i:
  281179: f5d9a93
v: v3
  • Loading branch information
Xi Wang authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent 18bee52 commit 6a84e6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fee6433bdd1a4ab403a79069eda9a38da9903243
refs/heads/master: 2a58b19fd97c7368c03c027419a2aeb26313adad
8 changes: 8 additions & 0 deletions trunk/drivers/staging/vt6655/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq)
result = -EFAULT;
break;
}
if (sList.uItem > (ULONG_MAX - sizeof(SBSSIDList)) / sizeof(SBSSIDItem)) {
result = -EINVAL;
break;
}
pList = (PSBSSIDList)kmalloc(sizeof(SBSSIDList) + (sList.uItem * sizeof(SBSSIDItem)), (int)GFP_ATOMIC);
if (pList == NULL) {
result = -ENOMEM;
Expand Down Expand Up @@ -571,6 +575,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq)
result = -EFAULT;
break;
}
if (sNodeList.uItem > (ULONG_MAX - sizeof(SNodeList)) / sizeof(SNodeItem)) {
result = -EINVAL;
break;
}
pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) {
result = -ENOMEM;
Expand Down

0 comments on commit 6a84e6d

Please sign in to comment.