mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avfilter/vf_kerndeint: Check for minimum height
Fixes: out of array access
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e32b2c8886)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
f70eb1cb0b
commit
e85eded615
@@ -85,6 +85,12 @@ static int config_props(AVFilterLink *inlink)
|
||||
|
||||
kerndeint->is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & AV_PIX_FMT_FLAG_RGB;
|
||||
kerndeint->vsub = desc->log2_chroma_h;
|
||||
if (AV_CEIL_RSHIFT(inlink->h, kerndeint->vsub) < 4) {
|
||||
av_log(inlink->dst, AV_LOG_ERROR,
|
||||
"Input height %d is too small; minimum chroma plane height is 4\n",
|
||||
inlink->h);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
ret = av_image_alloc(kerndeint->tmp_data, kerndeint->tmp_linesize,
|
||||
inlink->w, inlink->h, inlink->format, 16);
|
||||
|
||||
Reference in New Issue
Block a user