Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281043
b: refs/heads/master
c: 51935d2
h: refs/heads/master
i:
  281041: 963d504
  281039: 3df6b0f
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 1317d04 commit e44a0a7
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: 41c7b7c0fa2f68afb1154e88597ff6b9b97334cf
refs/heads/master: 51935d2259a476162bbf5c35ff81f3a01057ed6f
6 changes: 5 additions & 1 deletion trunk/drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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: don't trust user supplied length */
if (IoBuffer.OutputLength > USHRT_MAX ||
IoBuffer.OutputLength == 0) {
return -EINVAL;
}

temp_buff = kmalloc(IoBuffer.OutputLength, GFP_KERNEL);
if (!temp_buff)
return STATUS_FAILURE;
Expand Down

0 comments on commit e44a0a7

Please sign in to comment.