]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ads124: avoid buffer overflow
authorVincent Stehlé <vincent.stehle@laposte.net>
Sun, 31 Mar 2019 18:54:23 +0000 (20:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Jun 2019 07:16:10 +0000 (09:16 +0200)
commit6b84e38b700bf6c8f4e983ba1e6c01d8b16bf581
treef0089c5ca81fc0fb4eea8654c1a1ae7aa5ed1f0e
parent642ec93fe232028f859a090e8a1d8dc4e4367d39
iio: adc: ads124: avoid buffer overflow

commit 0db8aa49a97e7f40852a64fd35abcc1292a7c365 upstream.

When initializing the priv->data array starting from index 1, there is one
less element to consider than when initializing the full array.

Fixes: e717f8c6dfec8f76 ("iio: adc: Add the TI ads124s08 ADC code")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ti-ads124s08.c