mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_deblock: fix posible overreads
This commit is contained in:
parent
b74f212b7a
commit
9a22c6508a
|
@ -337,7 +337,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
s->deblockv(dst + x * s->bpc, out->linesize[plane],
|
s->deblockv(dst + x * s->bpc, out->linesize[plane],
|
||||||
FFMIN(block, height), s->ath, s->bth, s->gth, s->dth, s->max);
|
FFMIN(block, height), s->ath, s->bth, s->gth, s->dth, s->max);
|
||||||
|
|
||||||
for (y = block; y < height; y += block) {
|
for (y = block; y < height - block; y += block) {
|
||||||
dst += out->linesize[plane] * block;
|
dst += out->linesize[plane] * block;
|
||||||
|
|
||||||
s->deblockh(dst, out->linesize[plane],
|
s->deblockh(dst, out->linesize[plane],
|
||||||
|
@ -353,6 +353,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||||
s->ath, s->bth, s->gth, s->dth, s->max);
|
s->ath, s->bth, s->gth, s->dth, s->max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dst += out->linesize[plane] * block;
|
||||||
|
for (x = block; x < width; x += block)
|
||||||
|
s->deblockv(dst + x * s->bpc, out->linesize[plane],
|
||||||
|
FFMIN(block, height - y), s->ath, s->bth, s->gth, s->dth, s->max);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in != out)
|
if (in != out)
|
||||||
|
|
Loading…
Reference in New Issue