ref: f8555b5d8cdb76134175fc3260e06c8805ede867
parent: f41070fef0d9b3844c9f75714c637a8265739784
author: Werner Lemberg <[email protected]>
date: Thu Apr 3 01:45:38 EDT 2014
Don't require `gzip' module for `sfnt'. Reported by Preet <[email protected]>. * src/sfnt/sfobjs.c (woff_open_font): Guard use of FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-04-03 Werner Lemberg <[email protected]>
+
+ Don't require `gzip' module for `sfnt'.
+
+ Reported by Preet <[email protected]>.
+
+ * src/sfnt/sfobjs.c (woff_open_font): Guard use of
+ FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
+
2014-03-27 Werner Lemberg <[email protected]>
Fix Savannah bug #38235.
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2008, 2010-2013 by */
+/* Copyright 1996-2008, 2010-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -661,6 +661,8 @@
}
else
{
+#ifdef FT_CONFIG_OPTION_USE_ZLIB
+
/* Uncompress with zlib. */
FT_ULong output_len = table->OrigLength;
@@ -675,6 +677,13 @@
error = FT_THROW( Invalid_Table );
goto Exit;
}
+
+#else /* !FT_CONFIG_OPTION_USE_ZLIB */
+
+ error = FT_THROW( Unimplemented_Feature );
+ goto Exit;
+
+#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
}
FT_FRAME_EXIT();