]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: bcm: Fix an integer overflow in IOCTL_BCM_NVM_READ/WRITE
authorKevin McKinney <klmckinney1@gmail.com>
Tue, 20 Dec 2011 15:41:13 +0000 (10:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2012 01:19:03 +0000 (17:19 -0800)
commit48e62dc70e11f2dc494882c2a2c2e43b7b4ea7bf
tree8e74932054e9f9f9ab87642def51deb45e2dab9a
parentcb3768e831cfd0b53b5b66b14ff78e15624325be
Staging: bcm: Fix an integer overflow in IOCTL_BCM_NVM_READ/WRITE

Variables stNVMReadWrite.uioffset and stNVMReadWrite.uiNumBytes
are chosen from userspace and can be very high. The sum of
these two digits would result in a small number. Therefore,
this patch verifies a negative number was not entered, and
reorganizes the equation to remove the integer overflow.

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