• Kevin Mark's avatar
    libavfilter/scale2ref: Fix out-of-bounds array access · 08213e0b
    Kevin Mark authored
    ff_scale_eval_dimensions blindly assumes that two inputs are always
    available as of 3385989b. This is
    notably not the case when the function is called for the scale
    filter. With the scale filter inputs[1] does not exist.
    
    ff_scale_eval_dimensions now has an updated scale2ref check that
    makes certain two inputs are actually available before attempting to
    access the second one.
    
    Thanks to James Almer for reporting this bug. This should fix the 820
    Valgrind tests I single-handedly managed to break.
    Signed-off-by: 's avatarKevin Mark <kmark937@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    08213e0b
scale.c 6.56 KB