freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Announcing FreeType 2.10.1 - regression in ftgzip.c


From: Moazin Khatri
Subject: Re: [ft-devel] Announcing FreeType 2.10.1 - regression in ftgzip.c
Date: Tue, 2 Jul 2019 23:35:34 +0500

The manual also has a line:
windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format (the zlib format will return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a CRC-32 instead of an Adler-32.

Please correct me if I have drawn any wrong conclusions from this. :) 

On Tue, Jul 2, 2019 at 11:32 PM Lorcán Mc Donagh <address@hidden> wrote:
Hi,

I think the reason why this occurred is because the check "if ( w < 8 || w > 15 )" is only present
in the old version of zlib, the newer ones don't have this check.

Not according to https://zlib.net/manual.html (1.2.11, latest)
The windowBits parameter is the base two logarithm of the window size (the size of the history buffer). 
It should be in the range 8..15 for this version of the library. 
Larger values of this parameter result in better compression at the expense of memory usage. The default value is 15 if deflateInit is used instead.

47 bits sounds like a whole lot to me anyway ;)

As far as I know, FreeType can either use the externally installed Zlib (in which case this code
will work fine, hopefully). However, if your FreeType build uses the built-in copy of zlib (which 
is quite old) the code breaks. 

Werner, I think this change shouldn't have been made to master because it fails with the built-in version of zlib. Don't know what we should do now. Probably revert it?

Regards,

Moazin
_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]