mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
avfilter/vf_drawtext: Account for bbox text seperator
Fixes: out of array access
no test case
Found-by: Joshua Rogers <joshua@joshua.hu> with ZeroPath
Reviewed-by: Joshua Rogers <joshua@joshua.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad956ff076)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1017,7 +1017,7 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
av_log(ctx, AV_LOG_WARNING, "Multiple texts provided, will use text_source only\n");
|
av_log(ctx, AV_LOG_WARNING, "Multiple texts provided, will use text_source only\n");
|
||||||
av_free(s->text);
|
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));
|
(AV_NUM_DETECTION_BBOX_CLASSIFY + 1));
|
||||||
if (!s->text)
|
if (!s->text)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|||||||
Reference in New Issue
Block a user