Skip to content
Commit 34f5f8d5 authored by Sudarsan N's avatar Sudarsan N Committed by Benjamin Cabé
Browse files

drivers: adc: Prevent overflow in max1125x_read_sample



Fix potential integer overflow caused by unsafe shift when computing
ADC mid-scale offset. Applies resolution bounds and uses unsigned
shift to avoid undefined behavior.

Fixes: CID 487740
Signed-off-by: default avatarSudarsan N <sudarsansamy2002@gmail.com>
parent 1fbb4e87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment