From: Kevin McKinney Date: Wed, 9 Nov 2011 03:33:35 +0000 (-0500) Subject: Staging: bcm: Clean up code in ioctl: IOCTL_BCM_EEPROM_REGISTER_READ X-Git-Tag: v3.3-rc1~152^2~101^2~288 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51935d2259a476162bbf5c35ff81f3a01057ed6f;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed