ffmpeg/tests
Jun Zhao ce09ba4fd1
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-05-03 19:56:53 +02:00
..
api tests/api/api-dump-stream-meta-test: Fix leaks 2025-05-05 17:03:39 +02:00
checkasm checkasm/hevc_pel: rename loop variable 'size' to 'idx' to avoid confusion 2026-02-03 22:57:20 +08:00
fate tests/fate/filter-video: add two feedback tests 2025-12-18 22:26:04 +00: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-05-03 19:56:53 +02:00
streamgroups avformat/iamf: use the correct layouts for Sound Systems B and C 2025-01-03 10:27:13 -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 tests: Fix fate-run.sh to handle busybox-w32 absolute paths 2026-02-03 20:56:26 +00:00
fate-valgrind.supp
fate.sh
Makefile fate/all: add missing crc/framecrc/md5/framemd5/pipe dependencies 2025-07-05 21:10:49 +02: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