Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268491
b: refs/heads/master
c: e228b74
h: refs/heads/master
i:
  268489: 0d763e3
  268487: 2fa9b86
v: v3
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Sep 19, 2011
1 parent bf083b5 commit 0a2ea32
Show file tree
Hide file tree
Showing 3 changed files with 8 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: 5ac5bd8754b3dabcf4aea7b5f4a28a1d8494a1b0
refs/heads/master: e228b7426e65df0f2e93c783c2c89baabe318b9b
3 changes: 3 additions & 0 deletions trunk/drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (IoBuffer.InputLength < sizeof(struct link_request))
return -EINVAL;

if (IoBuffer.InputLength > MAX_CNTL_PKT_SIZE)
return -EINVAL;

pvBuffer = kmalloc(IoBuffer.InputLength, GFP_KERNEL);
if (!pvBuffer)
return -ENOMEM;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/bcm/Misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter,/**<Logical Adapter*/
pLeader->PLength = pktlen;
}
}

if (pktlen + LEADER_SIZE > MAX_CNTL_PKT_SIZE)
return -EINVAL;

memset(ctrl_buff, 0, pktlen+LEADER_SIZE);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Copying the Control Packet Buffer with length=%d\n", pLeader->PLength);
*(PLEADER)ctrl_buff=*pLeader;
Expand Down

0 comments on commit 0a2ea32

Please sign in to comment.