History

avfilter/vf_deblock: fix posible overreads

Paul B Mahol committed 4 years ago

Commit 9a22c651 parent b74f2121 file · +7 −1Browse files

Unified · Split

libavfilter/vf_deblock.c+7−1
@@ -337,7 +337,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 336 unmodified lines
337 s->deblockv(dst + x * s->bpc, out->linesize[plane],337 s->deblockv(dst + x * s->bpc, out->linesize[plane],
338 FFMIN(block, height), s->ath, s->bth, s->gth, s->dth, s->max);338 FFMIN(block, height), s->ath, s->bth, s->gth, s->dth, s->max);
339 339
340 for (y = block; y < height; y += block) {340 for (y = block; y < height - block; y += block) {
341 dst += out->linesize[plane] * block;341 dst += out->linesize[plane] * block;
342 342
343 s->deblockh(dst, out->linesize[plane],343 s->deblockh(dst, out->linesize[plane],
@@ -353,6 +353,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 9 unmodified lines
353 s->ath, s->bth, s->gth, s->dth, s->max);353 s->ath, s->bth, s->gth, s->dth, s->max);
354 }354 }
355 }355 }
356
357 dst += out->linesize[plane] * block;
358 for (x = block; x < width; x += block)
359 s->deblockv(dst + x * s->bpc, out->linesize[plane],
360 FFMIN(block, height - y), s->ath, s->bth, s->gth, s->dth, s->max);
361
356 }362 }
357 363
358 if (in != out)364 if (in != out)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t