Browse Source

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.
tags/n0.9
Stefano Sabatini 14 years ago
parent
commit
a342517710
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavfilter/vf_boxblur.c

+ 2
- 2
libavfilter/vf_boxblur.c 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;


Loading…
Cancel
Save