linux/drivers/staging
Dan Carpenter f3aa68405d media: staging: atomisp: array underflow in ioctl
I noticed an array underflow in ov5693_enum_frame_size().  The code
looks like this:

	int index = fse->index;

	if (index >= N_RES)
		retur -EINVAL;

fse->index is a u32 that comes from the user.  We want negative values
to be counted as -EINVAL but they aren't.  There are several ways to fix
this but I feel like the best fix for future proofing is to change the
type of N_RES from int to unsigned long to make it the same as if we
were comparing against ARRAY_SIZE().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-26 05:46:42 -04:00
..
android Staging: ion: fix code style warning from NULL comparisons 2017-06-29 16:38:53 +02:00
board
ccree staging: ccree: fix block comment style 2017-06-29 16:38:51 +02:00
clocking-wizard
comedi staging: comedi: use centralized error clean-up in comedi_init() 2017-06-24 00:37:07 +08:00
dgnc dgnc: fix multiple blank lines coding style problem 2017-05-25 18:56:45 +02:00
emxx_udc staging: emxx_udc: Update "reserved" registers name 2017-05-15 07:42:00 +02:00
fbtft staging: fbtft: Fix to avoid precedence issues 2017-05-29 16:41:37 +02:00
fsl-dpaa2 staging: fsl-mc: move mc-cmd.h contents in the public header 2017-06-29 16:38:53 +02:00
fsl-mc Staging/IIO patches for 4.13-rc1 2017-07-03 19:57:30 -07:00
fwserial
gdm724x Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
goldfish
greybus Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2017-07-10 09:22:48 -07:00
gs_fpgaboot
iio Merge 4.12-rc6 into staging-next 2017-06-20 10:17:45 +08:00
ks7010 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
lustre Staging/IIO patches for 4.13-rc1 2017-07-03 19:57:30 -07:00
media media: staging: atomisp: array underflow in ioctl 2017-07-26 05:46:42 -04:00
most Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
mt29f_spinand mtd: nand: Make sure drivers not supporting SET/GET_FEATURES return -ENOTSUPP 2017-05-30 08:59:26 +02:00
netlogic net: phy: Make phy_ethtool_ksettings_get return void 2017-06-13 12:59:06 -04:00
nvec Staging: nvec: Remove FSF's mailing address 2017-04-08 12:55:25 +02:00
octeon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
octeon-usb staging: octeon-usb: use correct function for hcd cleanup 2017-05-15 07:43:55 +02:00
olpc_dcon staging: olpc_dcon: style fixes 2017-04-28 12:07:24 +02:00
rtl8188eu Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
rtl8192e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
rtl8192u Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
rtl8712 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
rtl8723bs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
rts5208 staging/rts5208: Fix read overflow in memcpy 2017-06-06 16:16:10 +02:00
skein
sm750fb drivers: staging: sm750: Hold lock irrespective of fb numbers. 2017-06-29 16:38:50 +02:00
speakup staging: speakup: make function ser_to_dev static 2017-06-29 16:38:52 +02:00
typec staging: fusb302: don't bitshift __le16 type 2017-06-23 18:47:59 +02:00
unisys staging: unisys: visorhba - octal permissions 2017-06-25 16:31:21 +02:00
vc04_services sound updates for 4.13-rc1 2017-07-06 10:56:51 -07:00
vme staging: vme: Use BIT macro for bit definitions 2017-05-16 13:53:23 +02:00
vt6655 staging: vt6655 - add parameter names 2017-06-25 16:31:22 +02:00
vt6656 staging: vt6656: remove unnecesary blank lines 2017-05-18 15:59:37 +02:00
wilc1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
wlan-ng Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
xgifb staging: fb_xgi: vb_table: Remove white space after tabstop 2017-06-23 19:36:49 +02:00
Kconfig Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00
Makefile Staging/IIO patches for 4.12-rc1 2017-05-05 18:16:23 -07:00