summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2016-05-07 16:24:03 +0200
committerWerner Lemberg <wl@gnu.org>2016-05-07 16:24:03 +0200
commit7ae9b9996bfd2e4a2f63e7d987f577c30023781b (patch)
tree7884ccff3597b6c6edecb5fdcb8e25f17ffb1b25
parent6e88087d6962714e2cf1d1ddba56cfeb2cf9c02c (diff)
downloadfreetype2-7ae9b9996bfd2e4a2f63e7d987f577c30023781b.tar.gz
[cache] Allow value 0 for face ID.
We never dereference `face_id', and some implementations might use a running number instead of a pointer. Additionally, disallowing value zero was undocumented. * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for `face_id'.
-rw-r--r--ChangeLog12
-rw-r--r--src/cache/ftccmap.c3
-rw-r--r--src/cache/ftcmanag.c4
3 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a197e493f..0cc48b3a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2016-05-07 Werner Lemberg <wl@gnu.org>
+
+ [cache] Allow value 0 for face ID.
+
+ We never dereference `face_id', and some implementations might use a
+ running number instead of a pointer. Additionally, disallowing
+ value zero was undocumented.
+
+ * src/cache/ftccmap.c (FTC_CMapCache_Lookup), src/cache/ftcmanag.c
+ (FTC_Manager_LookupFace, FTC_Manager_RemoveFaceID): Remove test for
+ `face_id'.
+
2016-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] More efficient accounting of conic splits and draws.
diff --git a/src/cache/ftccmap.c b/src/cache/ftccmap.c
index 52fb3c79f..41a0ce97d 100644
--- a/src/cache/ftccmap.c
+++ b/src/cache/ftccmap.c
@@ -259,9 +259,6 @@
return 0;
}
- if ( !face_id )
- return 0;
-
query.face_id = face_id;
query.cmap_index = (FT_UInt)cmap_index;
query.char_code = char_code;
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 1f44d80ca..661a32af5 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -314,7 +314,7 @@
FTC_MruNode mrunode;
- if ( !aface || !face_id )
+ if ( !aface )
return FT_THROW( Invalid_Argument );
*aface = NULL;
@@ -672,7 +672,7 @@
FT_UInt nn;
- if ( !manager || !face_id )
+ if ( !manager )
return;
/* this will remove all FTC_SizeNode that correspond to