diff options
author | zhili.liu <[email protected]> | 2024-01-02 09:07:11 +0800 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2024-01-22 18:59:06 +0000 |
commit | 792595bab4925aa06532a14dd256db523eb4fa5e (patch) | |
tree | 3b120f7937981296b3af101b9eac7e8d95e7b4a0 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | b67f3e653e305abf1471934d7b9fdb9ad2df3eef (diff) |
iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC
Recently, we encounter kernel crash in function rm3100_common_probe
caused by out of bound access of array rm3100_samp_rates (because of
underlying hardware failures). Add boundary check to prevent out of
bound access.
Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100")
Suggested-by: Zhouyi Zhou <[email protected]>
Signed-off-by: zhili.liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions