[vlc-commits] [Git][videolan/vlc][master] freetype: fix potential null dereference

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 30 07:41:52 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
fefb396c by Steve Lhomme at 2025-09-30T07:26:28+00:00
freetype: fix potential null dereference

Similar to 07c6818558eb1033f7de5ead0e07f8e630b598e6

- - - - -


1 changed file:

- modules/text_renderer/freetype/text_layout.c


Changes:

=====================================
modules/text_renderer/freetype/text_layout.c
=====================================
@@ -1178,7 +1178,7 @@ static int LayoutLine( filter_t *p_filter,
     int i_last_run = -1;
     run_desc_t *p_run = 0;
     const text_style_t *p_style = 0;
-    FT_Face p_face = 0;
+    FT_Face p_face = NULL;
     FT_Vector pen = { .x = 0, .y = 0 };
 
     vlc_ftcache_metrics_t metrics = { 0 };
@@ -1303,7 +1303,7 @@ static int LayoutLine( filter_t *p_filter,
         int i_line_offset    = 0;
         int i_line_thickness = 0;
 
-        if( p_ch->p_style->i_style_flags & (STYLE_UNDERLINE | STYLE_STRIKEOUT) )
+        if( ( p_ch->p_style->i_style_flags & (STYLE_UNDERLINE | STYLE_STRIKEOUT) ) && p_face )
         {
             i_line_offset =
                 labs( FT_FLOOR( FT_MulFix( p_face->underline_position,



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fefb396cb7e63873d7234455338d03a0a3fab616

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fefb396cb7e63873d7234455338d03a0a3fab616
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list