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.
This commit is contained in:
Werner Lemberg 2014-04-03 05:45:38 +02:00
parent f41070fef0
commit f8555b5d8c
2 changed files with 19 additions and 1 deletions

View File

@ -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.

View File

@ -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();