ffmpeg/tests/ref
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
..
acodec avcodec/adpcm: improve decooding output for 4-bit ADPCM IMA WAV 2025-09-22 23:46:29 +00:00
fate lavfi/bwdif: fix heap-buffer-overflow with small height videos 2026-03-15 00:49:57 +01:00
lavf avformat/matroskadec: take into account priming samples in audio tracks 2026-02-05 23:21:49 -03:00
lavf-fate lavc/av1_parser: Extract SAR from render_size 2026-01-14 23:56:39 +00:00
pixfmt swscale/range_convert: fix truncation bias in range conversion 2025-11-06 20:36:08 +00:00
seek tests/fate/vcodec: Test intra_dc_precision 2026-03-07 20:14:36 +01:00
vsynth tests/fate/vcodec: Test intra_dc_precision 2026-03-07 20:14:36 +01:00