ffmpeg/tests
Jun Zhao 5bc4a9898c
lavfi/bwdif: fix heap-buffer-overflow with small height videos
Reproduce:
  ffmpeg -i /tmp/bwdif_test_input_160x4_gray16.jpg -vf "bwdif" -f null -

filter_intra accesses rows 3 lines away via cur[mrefs3] and cur[prefs3].
For small height videos (h <= 4), this causes heap-buffer-overflow.

Add boundary check for filter_intra when YADIF_FIELD_END is set.
The boundary condition (y < 3) or (y + 3 >= td->h) precisely matches
filter_intra's 3-line context requirement.

Test file: 160x4 gray16 JPEG
https://code.ffmpeg.org/attachments/db2ace24-bc00-4af6-a53a-5df6b0d51b15

fix #21570

Reviewed-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
(cherry picked from commit 795bccdaf5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-03-15 00:49:57 +01:00
..
api api-h264-test: indent output 2025-10-25 11:11:41 +02:00
checkasm checkasm: ac3dsp: Increase the float tolerance for sum_square_butterfly_float 2026-03-04 22:30:40 +00:00
fate avcodec/avcodec: Deprecate intra_dc_precision 2026-03-07 20:14:36 +01:00
filtergraphs tests/fate: add fate test for excessive frame buffering when using filters 2025-07-14 22:05:11 +02:00
maps
ref lavfi/bwdif: fix heap-buffer-overflow with small height videos 2026-03-15 00:49:57 +01:00
streamgroups tests/fate/iamf: add tests for Projection mode ambisonic Audio Elements 2025-12-29 12:02:53 -03:00
.gitignore
audiogen.c
audiomatch.c
base64.c
copycooker.sh
extended.ffconcat all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00
fate-run.sh libavformat/oggenc.c: re-initialize stream on new metadata. 2026-02-18 16:25:06 +00:00
fate-valgrind.supp
fate.sh fate.sh: Allow specifying --ar through a separate variable 2025-12-19 18:41:23 +00:00
Makefile tests/fate/demux: add a raw JPEG-XS demux test 2025-12-16 10:38:56 -03:00
md5.sh
refcmp-metadata.awk
reference.pnm
rotozoom.c
simple1.ffconcat all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00
simple2.ffconcat all: fix whitespace/new-line issues 2025-08-03 13:48:47 +02:00
test.ffmeta
tiny_psnr.c
tiny_ssim.c
utils.c
videogen.c