diff options
| author | Matti Vaittinen <mazziesaccount@gmail.com> | 2026-08-10 10:54:32 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-31 00:52:41 +0100 |
| commit | 0e65412aee4f651d2c9785f542a13e4b44002a75 (patch) | |
| tree | 6da7c91aef9ff929a6a725ea5455fd5af284fce4 /tools/lib/python/kdoc/python_version.py | |
| parent | 4e5b0b7c5d95814b6d76911a91572a0691925ca7 (diff) | |
| download | linux-next-0e65412aee4f651d2c9785f542a13e4b44002a75.tar.gz linux-next-0e65412aee4f651d2c9785f542a13e4b44002a75.zip | |
iio: accel: kionix-kx022a: Fix array boundary check
The driver performs a sanity check for an array size, when converting a
register value to an array index. The check incorrectly accepts the
sizeof(array) as a last index, when last valid index should be
sizeof(array) - 1.
Fix the check by bailing out when index >= sizeof(array).
Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
