Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268554
b: refs/heads/master
c: 0a2cc49
h: refs/heads/master
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Sep 30, 2011
1 parent 6c31b8f commit 984fde4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: d515d0ff36a7afd528f32e3511780ad8385d957e
refs/heads/master: 0a2cc4977ffd551b58ae20c646bd7083ba5a89d2
6 changes: 5 additions & 1 deletion trunk/drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (copy_from_user(&sRdmBuffer, IoBuffer.InputBuffer, IoBuffer.InputLength))
return -EFAULT;

/* FIXME: need to restrict BuffLen */
if (IoBuffer.OutputLength > USHRT_MAX ||
IoBuffer.OutputLength == 0) {
return -EINVAL;
}

Bufflen = IoBuffer.OutputLength + (4 - IoBuffer.OutputLength%4)%4;
temp_buff = kmalloc(Bufflen, GFP_KERNEL);
if (!temp_buff)
Expand Down

0 comments on commit 984fde4

Please sign in to comment.