[vlc-commits] [Git][videolan/vlc][3.0.x] freetype: fix potential null dereference
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Mon Sep 7 06:05:07 UTC 2026
François Cartegnie pushed to branch 3.0.x at VideoLAN / VLC
Commits:
eeca89df by Steve Lhomme at 2026-09-07T07:40:28+02:00
freetype: fix potential null dereference
Similar to 07c6818558eb1033f7de5ead0e07f8e630b598e6
(cherry picked from commit fefb396cb7e63873d7234455338d03a0a3fab616)
- - - - -
1 changed file:
- modules/text_renderer/freetype/text_layout.c
Changes:
=====================================
modules/text_renderer/freetype/text_layout.c
=====================================
@@ -1099,7 +1099,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 };
int i_line_index = 0;
@@ -1222,7 +1222,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/eeca89df607ce4b43ec3001d4547b03b828db9af
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/eeca89df607ce4b43ec3001d4547b03b828db9af
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list