PR #20811 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20811 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20811.patch
Fixes: out of array access no test case Found-by: Joshua Rogers <[email protected]> with ZeroPath Signed-off-by: Michael Niedermayer <[email protected]> >From bb465160a15208fc663086ec2f0a0e6d6b676702 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Sat, 1 Nov 2025 01:29:32 +0100 Subject: [PATCH] avfilter/vf_drawtext: Account for bbox text seperator Fixes: out of array access no test case Found-by: Joshua Rogers <[email protected]> with ZeroPath Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_drawtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 867536aa61..1d23805b54 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1011,7 +1011,7 @@ static av_cold int init(AVFilterContext *ctx) av_log(ctx, AV_LOG_WARNING, "Multiple texts provided, will use text_source only\n"); av_free(s->text); } - s->text = av_mallocz(AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE * + s->text = av_mallocz((AV_DETECTION_BBOX_LABEL_NAME_MAX_SIZE + 1) * (AV_NUM_DETECTION_BBOX_CLASSIFY + 1)); if (!s->text) return AVERROR(ENOMEM); -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
