iio: st_gyro: Add sentinel into array to fix out-of-bound memory access 65/30565/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 20 Nov 2014 07:45:47 +0000 (16:45 +0900)
committerChanho Park <chanho61.park@samsung.com>
Fri, 21 Nov 2014 08:48:04 +0000 (00:48 -0800)
commit52908d98ebc676f817ad2bc9c3646e3d06d85b21
treee51cbaf66591f5c841417bf519682c81ed5d5e1c
parentd8b315f4e6215c9fb3ff035cd96e7638e88b7e0e
iio: st_gyro: Add sentinel into array to fix out-of-bound memory access

Without sentinel, of_match_node() to array causes out-of-bound
memory access. So this patch adds sentinel.

Change-Id: I22a4c117f68bba05acc27e7b4c6ad86471e6cf6d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/iio/gyro/st_gyro_i2c.c
drivers/iio/gyro/st_gyro_spi.c