From 7665914ccd2edf011cfe2834f8a058e4e68d3361 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 13 Sep 2018 08:58:49 +0200 Subject: [PATCH] * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit. --- ChangeLog | 4 ++++ src/sfnt/sfdriver.c | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8436079c0..004fc4be6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-09-13 Werner Lemberg + + * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit. + 2018-09-13 Werner Lemberg * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'. diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index b7e435877..23f4a18e1 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -841,7 +841,14 @@ sfnt_is_alphanumeric, 0 ); - len = result ? ft_strlen( result ) : 0; + if ( !result ) + { + FT_TRACE0(( "sfnt_get_var_ps_name:" + " No valid PS name prefix for font instances found\n" )); + return NULL; + } + + len = ft_strlen( result ); /* sanitize if necessary; we reserve space for 36 bytes (a 128bit */ /* checksum as a hex number, preceded by `-' and followed by three */