You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
media: v4l2-dv-timings: prevent possible overflow in v4l2_detect_gtf()
In v4l2_detect_gtf(), it seems safer to cast the 32-bit image_width
variable to the 64-bit type u64 before multiplying to avoid
a possible overflow. The resulting object code even seems to
look better, at least on x86_64.
Found by Linux Verification Center (linuxtesting.org) with Svace.
[Sergey: rewrote the patch subject/descripition]
Fixes: c9bc9f5 ("[media] v4l2-dv-timings: fix overflow in gtf timings calculation")
Cc: [email protected]
Signed-off-by: Karina Yankevich <[email protected]>
Signed-off-by: Sergey Shtylyov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
0 commit comments