vf_boxblur: fix out-of-buffer access when h > w

Increase size of the private temporary buffers from w to FFMAX(w, h),
indeed they are used also for blurring vertical lines with length h.
This commit is contained in:
Stefano Sabatini 2011-08-03 00:01:41 +02:00
parent d68ba3feb8
commit a342517710
1 changed files with 2 additions and 2 deletions

View File

@ -144,8 +144,8 @@ static int config_input(AVFilterLink *inlink)
char *expr;
int ret;
if (!(boxblur->temp[0] = av_malloc(w)) ||
!(boxblur->temp[1] = av_malloc(w)))
if (!(boxblur->temp[0] = av_malloc(FFMAX(w, h))) ||
!(boxblur->temp[1] = av_malloc(FFMAX(w, h))))
return AVERROR(ENOMEM);
boxblur->hsub = desc->log2_chroma_w;