Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281182
b: refs/heads/master
c: 2013204
h: refs/heads/master
v: v3
  • Loading branch information
Xi Wang authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent 6a84e6d commit d753c4c
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: 2a58b19fd97c7368c03c027419a2aeb26313adad
refs/heads/master: 201320435d017e8ebd449034547ef0518ec4d056
8 changes: 8 additions & 0 deletions trunk/drivers/staging/vt6656/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,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 @@ -557,6 +561,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq)
result = -EFAULT;
break;
}
if (sNodeList.uItem > (ULONG_MAX - sizeof(SNodeList)) / sizeof(SNodeItem)) {
result = -ENOMEM;
break;
}
pNodeList = (PSNodeList)kmalloc(sizeof(SNodeList) + (sNodeList.uItem * sizeof(SNodeItem)), (int)GFP_ATOMIC);
if (pNodeList == NULL) {
result = -ENOMEM;
Expand Down

0 comments on commit d753c4c

Please sign in to comment.