ffmpeg/tests/ref
Jun Zhao 06b191f035
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-04 15:57:20 +02:00
..
acodec avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
fate lavfi/bwdif: fix heap-buffer-overflow with small height videos 2026-05-04 15:57:20 +02:00
lavf movenc: Add an option for resilient, hybrid fragmented/non-fragmented muxing 2024-06-24 11:24:04 +03:00
lavf-fate fate/lavf-container: add a test for L-HEVC remuxing 2024-07-15 18:19:00 -03:00
pixfmt fate/pixfmt: test xyz12le 2021-08-29 18:44:46 +02:00
seek fate/lavf-audio: Test writing AIFF-native tags 2024-03-17 16:08:13 +01:00
vsynth tests/fate/vcodec: add vsynth tests for FFV1 version 2 2024-08-01 10:09:25 +02:00