diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-13 23:10:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-05-04 20:00:05 +0200 |
commit | 25b2341f9a36f367ec9c50e859b0053d64675603 (patch) | |
tree | 117ea138f594420cb9d746a73492dd4c6a1497da /libavfilter | |
parent | b116c7a6b05d96845ebc490e916e7cc3d90c1249 (diff) | |
download | ffmpeg-25b2341f9a36f367ec9c50e859b0053d64675603.tar.gz |
avfilter/vf_fieldorder: fix heap-buffer overflow
Fixes #8264
(cherry picked from commit 07050d7bdc32d82e53ee5bb727f5882323d00dba)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_fieldorder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index ca55ff1f66..5707151f1b 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -108,8 +108,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) s->dst_tff ? "up" : "down"); h = frame->height; for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) { - dst_line_step = out->linesize[plane]; - src_line_step = frame->linesize[plane]; + dst_line_step = out->linesize[plane] * (h > 2); + src_line_step = frame->linesize[plane] * (h > 2); line_size = s->line_size[plane]; dst = out->data[plane]; src = frame->data[plane]; |