This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/7.1 in repository ffmpeg.
commit 7aa5eb58337262064742f431e0b2b42da60babec Author: Marvin Scholz <[email protected]> AuthorDate: Tue Apr 21 23:40:07 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Mon May 4 15:57:25 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 f3ce7a6f07..f4cc8179df 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1434,8 +1434,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]
