diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-07-25 23:40:01 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-08-29 16:15:24 +0100 |
commit | 9d47964bfd471f0dd4c89f28556aec68bffa0020 (patch) | |
tree | 2d8019f310f52bc66da8d8ae9ba3540050d10a3f /tools/iio | |
parent | d5bd1eba19230347acfc4960581a15bfb459a615 (diff) | |
download | op-kernel-dev-9d47964bfd471f0dd4c89f28556aec68bffa0020.zip op-kernel-dev-9d47964bfd471f0dd4c89f28556aec68bffa0020.tar.gz |
iio: ad5755: fix off-by-one on devnr limit check
The comparison for devnr limits is off-by-one, the current check
allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds
write to pdata->dac[devnr]. Fix this by replacing > with >= on the
comparison.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
0 files changed, 0 insertions, 0 deletions