This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 9cbd7e2589824afaf38b3e8a01f4d00b8f7d13f1 Author: Marvin Scholz <[email protected]> AuthorDate: Tue Apr 21 23:40:07 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun May 3 19:24:52 2026 +0200 lavfi: vf_drawtext: check memory allocation Switch to av_calloc and check the allocation. Fix #22867 (cherry picked from commit 69072fe8d8bc3567ae9426458bc45d432651eed5) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_drawtext.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index d2d3bd8f69..70f2209c8e 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1435,8 +1435,13 @@ continue_on_failed: } s->line_count = line_count; - s->lines = av_mallocz(line_count * sizeof(TextLine)); - s->tab_clusters = av_mallocz(s->tab_count * sizeof(uint32_t)); + s->lines = av_calloc(line_count, sizeof(TextLine)); + s->tab_clusters = av_calloc(s->tab_count, sizeof(uint32_t)); + if ((line_count > 0 && !s->lines) || + (s->tab_count > 0 && !s->tab_clusters)) { + ret = AVERROR(ENOMEM); + goto done; + } for (i = 0; i < s->tab_count; ++i) { s->tab_clusters[i] = -1; } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
