Don't require `gzip' module for `sfnt'. Reported by Preet <prismatic.project@gmail.com>. * src/sfnt/sfobjs.c (woff_open_font): Guard use of FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
diff --git a/ChangeLog b/ChangeLog
index d903984..745718a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-04-03 Werner Lemberg <wl@gnu.org>
+
+ Don't require `gzip' module for `sfnt'.
+
+ Reported by Preet <prismatic.project@gmail.com>.
+
+ * src/sfnt/sfobjs.c (woff_open_font): Guard use of
+ FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
+
2014-03-27 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #38235.
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index a31c77c..0b1760c 100644
--- 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();