[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 40676afc4 1/2: [sfnt] Fix handling of PS names for Va
From: |
Werner Lemberg |
Subject: |
[freetype2] master 40676afc4 1/2: [sfnt] Fix handling of PS names for Variation Fonts. |
Date: |
Tue, 25 Apr 2023 05:47:49 -0400 (EDT) |
branch: master
commit 40676afc4ce15fbcb4f73e1b7016ebfb3e7b5390
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>
[sfnt] Fix handling of PS names for Variation Fonts.
* src/sfnt/sfdriver.c (get_win_string, get_apple_string): Continue
construction of string if an invalid character is encountered.
Fixes #1218.
---
src/sfnt/sfdriver.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 762883db5..1e573fb08 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -523,15 +523,14 @@
FT_TRACE0(( "get_win_string:"
" Character 0x%X invalid in PS name string\n",
((unsigned)p[0])*256 + (unsigned)p[1] ));
- break;
+ continue;
}
}
- if ( !len )
- *r = '\0';
+ *r = '\0';
FT_FRAME_EXIT();
- if ( !len )
+ if ( r != result )
return result;
get_win_string_error:
@@ -580,15 +579,14 @@
FT_TRACE0(( "get_apple_string:"
" Character `%c' (0x%X) invalid in PS name string\n",
*p, *p ));
- break;
+ continue;
}
}
- if ( !len )
- *r = '\0';
+ *r = '\0';
FT_FRAME_EXIT();
- if ( !len )
+ if ( r != result )
return result;
get_apple_string_error:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 40676afc4 1/2: [sfnt] Fix handling of PS names for Variation Fonts.,
Werner Lemberg <=