[vlc-commits] FreeType: fix NULL deref on embedded fonts (fixes #7771)
Rémi Denis-Courmont
git at videolan.org
Sat Nov 17 10:15:45 CET 2012
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 17 11:04:12 2012 +0200| [dee71770b8ce88d28d9a12c9a9fe799035a1fc63] | committer: Rémi Denis-Courmont
FreeType: fix NULL deref on embedded fonts (fixes #7771)
FT_Face.family_name can be NULL for embedded fonts.
See also http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_FaceRec
(not cherry-picked from d96f6e23adfd24ec188cb2a7b31cc2e992291172)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=dee71770b8ce88d28d9a12c9a9fe799035a1fc63
---
modules/misc/freetype.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c
index 2fe7c10..f08c03e 100644
--- a/modules/misc/freetype.c
+++ b/modules/misc/freetype.c
@@ -1709,7 +1709,8 @@ static int CheckForEmbeddedFont( filter_sys_t *p_sys, FT_Face *pp_face, ft_style
{
if( p_face )
{
- bool match = !strcasecmp( p_face->family_name,
+ bool match = p_face->family_name != NULL
+ && !strcasecmp( p_face->family_name,
p_style->psz_fontname );
if( p_face->style_flags & FT_STYLE_FLAG_BOLD )
More information about the vlc-commits
mailing list