Files
FFmpeg/libavcodec
Andreas Rheinhardt 89f2016ece avcodec/hpel_template: Fix unintentional usage of unsigned offsets
The value of sizeof() is of type size_t which means that
an expression like
src1[i * src_stride1 + 4 * (int)sizeof(pixel)]
will use a very large offset if src_stride1 is sufficiently negative.
It works in practice (because it is correct modulo SIZE_MAX),
but UBSan treats it as error:
libavcodec/hpel_template.c:104:1: runtime error: addition of unsigned offset to 0x7ffdfa0391d8 overflowed to 0x7ffdfa0391cc
Fix this by casting sizeof(pixel) to int.

(This has been uncovered by a checkasm test for the hpeldsp
which will be added in a later commit.)

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-26 06:20:52 +02:00
..
2025-08-03 13:48:47 +02:00
2025-09-22 23:46:29 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-03 06:48:02 +00:00
2025-08-03 13:48:47 +02:00
2025-09-22 23:46:29 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-07-29 23:38:16 +02:00
2025-08-03 13:48:47 +02:00
2025-04-27 15:52:30 +01:00
2025-04-27 15:52:30 +01:00
2025-08-03 13:48:47 +02:00
2025-09-22 23:46:29 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-08-07 19:44:59 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:19:25 +00:00
2025-08-03 13:48:47 +02:00
2025-07-03 20:35:23 +02:00
2025-08-11 20:31:09 +02:00
2025-06-23 17:16:42 +10:00
2025-05-13 00:20:23 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-26 06:20:30 +02:00
2025-06-06 17:21:37 +02:00
2025-08-03 13:19:25 +00:00
2025-08-03 13:19:25 +00:00
2025-07-20 01:05:23 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-05-09 22:26:51 +02:00
2025-08-06 21:04:56 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-22 23:46:29 +00:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-08-08 18:29:40 +09:00
2025-08-08 18:29:40 +09:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-07-03 20:34:51 +02:00
2025-08-03 13:48:47 +02:00
2025-07-03 20:35:23 +02:00
2025-07-03 20:35:32 +02:00
2025-04-02 09:25:46 +02:00
2025-04-02 09:25:46 +02:00
2025-08-11 11:54:31 +02:00
2025-08-03 13:48:47 +02:00
2025-03-20 07:10:17 +01:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-09-26 06:20:30 +02:00
2025-09-22 23:46:29 +00:00
2025-08-03 13:48:47 +02:00
2025-06-21 22:08:52 +02:00
2025-08-03 13:48:47 +02:00
2025-08-20 11:20:14 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2025-04-25 23:01:37 +02:00
2025-08-08 18:29:40 +09:00
2025-08-08 18:29:40 +09:00
2025-08-03 13:48:47 +02:00
2025-08-04 09:12:17 +00:00
2025-07-03 20:35:23 +02:00