[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 6a43103: [gzip] Support `gzip' encoded header conditi
From: |
Moazin Khatti |
Subject: |
[freetype2] master 6a43103: [gzip] Support `gzip' encoded header conditionally. |
Date: |
Mon, 2 Mar 2020 09:01:04 -0500 (EST) |
branch: master
commit 6a431038c9113d906d66836cd7d216a5c630be7c
Author: Moazin Khatti <address@hidden>
Commit: Moazin Khatti <address@hidden>
[gzip] Support `gzip' encoded header conditionally.
In order to support `gzip' encoded header the call to
`inflateInit2' was modified in commit 6a92b1fadde26477a9179.
However, this code breaks with the outdated internal version
of zlib. This is a temporary fix to conditionally support
`gzip' encoded header whenever a system installation of zlib
is being used.
Problem report in
https://lists.nongnu.org/archive/html/freetype-devel/2020-02/msg00023.html
* src/gzip/ftgzip.c (FT_Gzip_Uncompress): Change the the call to
`inflateInit2' depending on whether the system installation is
being used or the internal copy.
---
ChangeLog | 19 +++++++++++++++++++
src/gzip/ftgzip.c | 10 ++++++++++
2 files changed, 29 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 6bbb957..471b5c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2020-03-02 Moazin Khatti <address@hidden>
+
+ [gzip] Support `gzip' encoded header conditionally.
+
+ In order to support `gzip' encoded header the call to
+ `inflateInit2' was modified in commit 6a92b1fadde26477a9179.
+ However, this code breaks with the outdated internal version
+ of zlib. This is a temporary fix to conditionally support
+ `gzip' encoded header whenever a system installation of zlib
+ is being used.
+
+ Problem report in
+
+
https://lists.nongnu.org/archive/html/freetype-devel/2020-02/msg00023.html
+
+ * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Change the the call to
+ `inflateInit2' depending on whether the system installation is
+ being used or the internal copy.
+
2020-02-29 Ben Wagner <address@hidden>
[truetype] Fix state of `FT_Face' for buggy `gvar' tables (#57923).
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index d192b10..6b1df3a 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -746,7 +746,17 @@
stream.zfree = (free_func) ft_gzip_free;
stream.opaque = memory;
+ /* This is a temporary fix and will be removed once the internal
+ * copy of zlib is updated to the newest version. The `|32' flag
+ * is only supported in the new versions of zlib to enable gzip
+ * encoded header.
+ */
+#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
err = inflateInit2( &stream, MAX_WBITS|32 );
+#else
+ err = inflateInit2( &stream, MAX_WBITS );
+#endif
+
if ( err != Z_OK )
return FT_THROW( Invalid_Argument );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 6a43103: [gzip] Support `gzip' encoded header conditionally.,
Moazin Khatti <=