Staging: bcm: Add size minimum size restrictions for IOCTL_IDLE_REQ
authorKevin McKinney <klmckinney1@gmail.com>
Sun, 18 Sep 2011 22:34:46 +0000 (18:34 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 19 Sep 2011 17:46:17 +0000 (10:46 -0700)
commit5ac5bd8754b3dabcf4aea7b5f4a28a1d8494a1b0
tree06f2a5c39a9158f62c9cf78addb4269cd2c8e54f
parent7518b9b8fc72a6c0ba67f33bdd4689c7dd28686a
Staging: bcm: Add size minimum size restrictions for IOCTL_IDLE_REQ

If IoBuffer.InputLength is zero then this will cause an Oops when
we dereference the ZERO_SIZE_PTR.  Or if it's smaller than
sizeof(struct link_request) then we would get memory corruption
when we set ->PLength in CopyBufferToControlPacket().

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/bcm/Bcmchar.c