Commit a3425177 authored by Stefano Sabatini's avatar Stefano Sabatini

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.
parent d68ba3fe
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment