avfilter/boxblur: Fix off by one errors

Fixes: ada-2-poc.mkv

Found-by: Claude and Ada Logics. This issue was found by Anthropic from using agents to study security of open source projects, and I am from Ada Logics helping validate the found issues and report to maintainers.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
David Korczynski
2026-05-16 16:52:36 +02:00
committed by michaelni
parent ef3ff9a73d
commit 444f2cf047
+2 -2
View File
@@ -114,9 +114,9 @@ int ff_boxblur_eval_filter_params(AVFilterLink *inlink,
#define CHECK_RADIUS_VAL(w_, h_, comp) \
if (comp->radius < 0 || \
2*comp->radius > FFMIN(w_, h_)) { \
2*comp->radius >= FFMIN(w_, h_)) { \
av_log(ctx, AV_LOG_ERROR, \
"Invalid " #comp " radius value %d, must be >= 0 and <= %d\n", \
"Invalid " #comp " radius value %d, must be >= 0 and < %d\n", \
comp->radius, FFMIN(w_, h_)/2); \
return AVERROR(EINVAL); \
}