Skip to content
Commit 3ff4065c authored by Andy Gross's avatar Andy Gross Committed by Anas Nashif
Browse files

drivers: sensors: lsm6dsl: Fix array overrun



This patch fixes an overrun detected via Coverity.  The
lsm6dsl_odr_to_freq_val function takes an index as argument.  If the
index is out of bounds, the expected behavior was to return the last
element of an array.  The actual behavior was to overrun the array.

Fixes: #7482

Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
parent f71e497d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment