Skip to content
Commit 1d51942c authored by sudarsan N's avatar sudarsan N Committed by Benjamin Cabé
Browse files

drivers: adc: fix overflow and div-by-zero in adc_ad7124_odr_to_fs



Add check for odr <= 0 and cast odr to uint32_t before multiplication
to avoid integer overflow and division by zero.

Fixes: CID 489220

Signed-off-by: default avatarsudarsan N <sudarsansamy2002@gmail.com>
parent 6f433a93
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment