]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: bcm: Clean up code in ioctl: IOCTL_BCM_EEPROM_REGISTER_READ
authorKevin McKinney <klmckinney1@gmail.com>
Wed, 9 Nov 2011 03:33:35 +0000 (22:33 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 01:13:33 +0000 (17:13 -0800)
commitd6e53a931c6d1ef1a2a4c005f3414be44499d236
tree59704e6d69bf4358832d2b6fad9cc7f35d8c5a8a
parent98704c3a64760c9dbcdd4f060bfb4b300163db48
Staging: bcm: Clean up code in ioctl: IOCTL_BCM_EEPROM_REGISTER_READ

This patch verifies two conditions before executing
a kmalloc call. First, it checks to see that
IoBuffer.OutputLength is not greater than an
unsigned short. If so, an invalid value may be
returned. The second change is a check to make
sure IoBuffer.OutputLength is not equal to
zero. Which simply keeps this code inline with
the other ioctl, IOCTL_BCM_REGISTER_READ_PRIVATE.

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