This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/8.0
in repository ffmpeg.

commit d0126671f79cad486284b2067fa32b5faa9c1c92
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat May 30 04:43:32 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 14 04:59:06 2026 +0200

    avfilter/vf_drawtext: Avoid double free in glyph_enu_border_free()
    
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 073c44b8bc261e57bf1d69cc621cd6d419ac24e1)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_drawtext.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index bcf7bcebb8..a3a1d60ace 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1093,10 +1093,10 @@ static int glyph_enu_border_free(void *opaque, void 
*elem)
 
     if (glyph->border_glyph != NULL) {
         for (int t = 0; t < 16; ++t) {
-            if (glyph->border_bglyph[t] != NULL) {
-                FT_Done_Glyph((FT_Glyph)glyph->border_bglyph[t]);
-                glyph->border_bglyph[t] = NULL;
-            }
+            FT_Glyph bbg = (FT_Glyph)glyph->border_bglyph[t];
+            if (bbg && bbg != glyph->border_glyph)
+                FT_Done_Glyph(bbg);
+            glyph->border_bglyph[t] = NULL;
         }
         FT_Done_Glyph(glyph->border_glyph);
         glyph->border_glyph = NULL;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to