projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd22c23
)
iio: adc: mp2629: fix potential array out of bound access
author
Saravanan Sekar
<sravanhome@gmail.com>
Sat, 29 Oct 2022 09:29:55 +0000
(11:29 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 26 Nov 2022 08:24:46 +0000
(09:24 +0100)
commit
ca1547ab15f48dc81624183ae17a2fd1bad06dfc
upstream.
Add sentinel at end of maps to avoid potential array out of
bound access in iio core.
Fixes: 7abd9fb64682 ("iio: adc: mp2629: Add support for mp2629 ADC driver")
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Link:
https://lore.kernel.org/r/20221029093000.45451-4-sravanhome@gmail.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/mp2629_adc.c
patch
|
blob
|
history
diff --git
a/drivers/iio/adc/mp2629_adc.c
b/drivers/iio/adc/mp2629_adc.c
index e7fbfe92e884ae0647b03c8ad3b69487758598b4..79d8fd79b0549dffa2e17c646c2ccf9f037df8ee 100644
(file)
--- a/
drivers/iio/adc/mp2629_adc.c
+++ b/
drivers/iio/adc/mp2629_adc.c
@@
-56,7
+56,8
@@
static struct iio_map mp2629_adc_maps[] = {
MP2629_MAP(SYSTEM_VOLT, "system-volt"),
MP2629_MAP(INPUT_VOLT, "input-volt"),
MP2629_MAP(BATT_CURRENT, "batt-current"),
- MP2629_MAP(INPUT_CURRENT, "input-current")
+ MP2629_MAP(INPUT_CURRENT, "input-current"),
+ { }
};
static int mp2629_read_raw(struct iio_dev *indio_dev,