linux/drivers/media/v4l2-core
Karina Yankevich 3edd1fc48d 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: c9bc9f5075 ("[media] v4l2-dv-timings: fix overflow in gtf timings calculation")
Cc: stable@vger.kernel.org
Signed-off-by: Karina Yankevich <k.yankevich@omp.ru>
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-03-06 17:28:27 +01:00
..
Kconfig media: remove the old videobuf framework 2023-09-27 09:40:01 +02:00
Makefile media: remove the old videobuf framework 2023-09-27 09:40:01 +02:00
tuner-core.c
v4l2-async.c media: v4l: add missing MODULE_DESCRIPTION() macros 2024-06-15 11:16:40 +02:00
v4l2-cci.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
v4l2-common.c media: v4l: Support obtaining link frequency via get_mbus_config 2025-02-15 15:22:53 +01:00
v4l2-compat-ioctl32.c media: core: Report the maximum possible number of buffers for the queue 2023-11-23 12:38:05 +01:00
v4l2-ctrls-api.c media: v4l2-core: Introduce v4l2_query_ext_ctrl_to_v4l2_queryctrl 2025-03-05 10:43:26 +01:00
v4l2-ctrls-core.c media: v4l2-core: use (t,l)/wxh format for rectangle 2025-03-05 10:43:27 +01:00
v4l2-ctrls-defs.c media: v4l2-ctrls: Add average QP control 2024-06-10 10:24:30 +02:00
v4l2-ctrls-priv.h
v4l2-ctrls-request.c
v4l2-dev.c media: v4l2: Remove vidioc_s_ctrl callback 2025-03-05 10:43:26 +01:00
v4l2-device.c media: v4l: Set sub-device's owner field to the caller's module 2024-04-26 11:30:43 +01:00
v4l2-dv-timings.c media: v4l2-dv-timings: prevent possible overflow in v4l2_detect_gtf() 2025-03-06 17:28:27 +01:00
v4l2-event.c media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by 2023-10-07 10:55:45 +02:00
v4l2-fh.c
v4l2-flash-led-class.c
v4l2-fwnode.c media: v4l: fwnode: Parse MiPI DisCo for C-PHY line-orders 2024-12-19 12:50:14 +01:00
v4l2-h264.c
v4l2-i2c.c media: v4l: Set sub-device's owner field to the caller's module 2024-04-26 11:30:43 +01:00
v4l2-ioctl.c media: v4l2-core: use (t,l)/wxh format for rectangle 2025-03-05 10:43:27 +01:00
v4l2-jpeg.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
v4l2-mc.c media: mc: fix endpoint iteration 2024-12-19 12:50:17 +01:00
v4l2-mem2mem.c media: v4l2: Add mem2mem helpers for REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
v4l2-spi.c media: v4l: Set sub-device's owner field to the caller's module 2024-04-26 11:30:43 +01:00
v4l2-subdev-priv.h
v4l2-subdev.c media: v4l: Memset argument to 0 before calling get_mbus_config pad op 2025-02-15 15:22:54 +01:00
v4l2-trace.c
v4l2-vp9.c