ffmpeg/libswresample
Michael Niedermayer 87f4b690ab
swresample/resample_template: add casts to avoid undefined overflows
resample_linear can produce overflows with craftet input,
The added casts should have no effect on the binary output or the operations they
just change things to a defined regime

Fixes: signed integer overflow: 2069416960 + 78151680 cannot be represented in type 'int'
Fixes: 472047214/clusterfuzz-testcase-minimized-ffmpeg_SWR_fuzzer-6374046976770048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 17cad7ac75)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-05-05 15:21:06 +02:00
..
aarch64 all: apply linter fixes 2025-12-03 20:26:49 +01:00
arm Include attributes.h directly 2021-04-19 14:34:10 +02:00
tests swresample: convert to new channel layout API 2022-03-15 09:42:46 -03:00
x86 swresample/x86/resample: Remove obsolete MMXEXT functions 2022-06-14 01:28:29 +02:00
audioconvert.c all: Replace if (ARCH_FOO) checks by #if ARCH_FOO 2022-06-15 04:56:37 +02:00
audioconvert.h avutil/internal, swresample/audioconvert: Remove cpu.h inclusions 2021-07-22 14:33:45 +02:00
dither.c swresample: Skip over dither steps if dithering scale is 0 2016-08-18 11:52:11 +02:00
dither_template.c
libswresample.v Merge commit '535a742c26' 2016-06-27 17:56:47 +02:00
log2_tab.c
Makefile lib*/version: Move library version functions into files of their own 2022-05-10 06:49:32 +02:00
noise_shaping_data.c swresample/noise_shaping_data: Remove unused tables 2022-06-15 04:58:14 +02:00
options.c swresample: convert to new channel layout API 2022-03-15 09:42:46 -03:00
rematrix.c swresample: Check user chlayout in swr_set_matrix() 2026-05-05 15:21:03 +02:00
rematrix_template.c swresample: convert to new channel layout API 2022-03-15 09:42:46 -03:00
resample.c swresample/resample: fix rounding errors with filter_size=1 and phase_shift=0 2024-03-19 21:01:06 +01:00
resample.h swresample/aarch64: add ff_resample_common_apply_filter_{x4,x8}_{float,s16}_neon 2017-01-13 21:24:19 +01:00
resample_dsp.c all: Replace if (ARCH_FOO) checks by #if ARCH_FOO 2022-06-15 04:56:37 +02:00
resample_template.c swresample/resample_template: add casts to avoid undefined overflows 2026-05-05 15:21:06 +02:00
soxr_resample.c all: apply linter fixes 2025-12-03 20:26:49 +01:00
swresample.c swresample: Check ch layouts in swr_alloc_set_opts2() 2026-05-05 15:21:03 +02:00
swresample.h Keep including the full version.h when headers are included externally 2022-03-19 00:01:57 +02:00
swresample_frame.c all: apply linter fixes 2025-12-03 20:26:49 +01:00
swresample_internal.h swresample: Check user chlayout in swr_set_matrix() 2026-05-05 15:21:03 +02:00
swresampleres.rc
version.c all: apply linter fixes 2025-12-03 20:26:49 +01:00
version.h Bump Versions for 5.1 branch 2022-07-13 00:27:37 +02:00
version_major.h libswresample: Split version.h 2022-03-16 14:05:26 +02:00