Staging: bcm: Add size maximum size restrictions for IOCTL_IDLE_REQ
authorKevin McKinney <klmckinney1@gmail.com>
Sun, 18 Sep 2011 22:34:47 +0000 (18:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 19 Sep 2011 17:46:17 +0000 (10:46 -0700)
In the first alteration, the MAX_CNTL_PKT_SIZE is the
maximum size of the control packet in ->Adapter->txctlpacket[]
which is defined in InitAdapter(). This caps the size of
kmalloc memory allocation. In the second change, this max
cap fixes a potential memory corruption bug when subsequent
memset and memcpy calls are invoked.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

No differences found