The ENOMEM check in config_input() tested slice_factor_a and line_factor_a twice each due to a copy-paste error, leaving the slice_factor_b and line_factor_b allocations unchecked. Both buffers are dereferenced unconditionally in the filter kernel, so an allocation failure resulted in a NULL pointer dereference instead of a clean AVERROR(ENOMEM).
Signed-off-by: Anas Khan <[email protected]> --- libavfilter/vf_bilateral.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c index 0a08a6d6d6..ef6dad1ebf 100644 --- a/libavfilter/vf_bilateral.c +++ b/libavfilter/vf_bilateral.c @@ -142,9 +142,9 @@ static int config_input(AVFilterLink *inlink) !s->map_factor_a[p] || !s->map_factor_b[p] || !s->slice_factor_a[p] || - !s->slice_factor_a[p] || + !s->slice_factor_b[p] || !s->line_factor_a[p] || - !s->line_factor_a[p]) + !s->line_factor_b[p]) return AVERROR(ENOMEM); } -- 2.54.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
