Age | Commit message (Collapse) | Author |
|
1.2.11 started bailing when avail_out==0 regardless of whether
there's anything to flush or not, and there's no point in adapting
the old method since it was vulnerable to bugs in other zlib
versions which updated the deflate parameters even on failure.
The api_deflateParams test has been expanded accordingly, and two
white-box cases in zip_usage has been updated to make fewer
assumptions about the output; the validity of the compressed data
is what matters, not whether it's exactly the same as the test
vector.
|
|
|
|
I accidentally merged a few fixes directly to maint-20 (and then to maint
and master), instead of merging to maint and master and waiting for a
patch to merge it into maint-20, leaving the related tickets dangling.
This commit does nothing beyond getting the tickets (and their release
notes) into the next patch.
|
|
Quoting RFC 1952:
"A gzip file consists of a series of "members" (compressed data
sets). [...] The members simply appear one after another in the
file, with no additional information before, between, or after
them."
|
|
When presented with multiple valid but concatenated streams, the
old driver returned an empty result once the end of the first
stream was reached, and kept doing so even if fed new data. The
new driver/NIF returned a data_error instead.
zlib:inflateInit/3 has been added to control this behavior, but is
not yet ready for public use.
|
|
OTP-14527
|
|
All operations will now yield appropriately, allowing them to be used
freely in concurrent applications. This commit also deprecates the
functions listed below, although they won't raise deprecation
warnings until OTP 21:
zlib:adler32
zlib:crc32
zlib:inflateChunk
zlib:getBufSize
zlib:setBufSize
The behavior of throwing an error when a dictionary is required for
decompression has also been deprecated.
|
|
|
|
|
|
|
|
* essen/zlib-export-types:
Export useful types from zlib module
OTP-12584
|
|
* essen/zlib-windowbits:
Update zlib:zwindowbits/0 type to accept 8 and -8
OTP-12564
|
|
Commit 7e8f5a776cbfa376e03369d058a90c8dd9f217fc (importing R11B-3)
updated zlib, which had changed what values it accepts for window
bits from 9-15 to 8-15.
From deflate.c:
- windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
+ windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_FIXED) {
return Z_STREAM_ERROR;
}
+ if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
In inflate.c 8 was already an accepted value.
This commit updates OTP to also accept the values 8 and -8.
|
|
|
|
This functionality may be useful for compressed streams with high
compression ratio (in case of gzip it may be up to x1000), when
small amount of compressed data will produce large amount of
uncompressed output. This may lead to DoS attacks, because
server easily goes out of memory.
Example of such high compression ratio stream:
```
dd if=/dev/zero of=sparse.bin bs=1MB count=100 # 100mb of zeroes
gzip sparse.bin # 95kb sparse.bin.gz
$ erl
> {ok, Compressed} = file:read_file("sparse.bin.gz"),
> 97082 = size(Compressed),
> Uncompressed = zlib:gunzip(Compressed),
> 100000000 = iolist_size(Uncompressed).
```
|
|
|
|
Conflicts:
erts/preloaded/ebin/zlib.beam
|
|
Terms of this type are returned and sometimes sit in states.
Exporting it allows us to properly track the types there.
|
|
|
|
|
|
zip,unzip,gzip,gunzip,compress and uncompress did not close the port
when given invalid data argument. Fixed by putting close in "try-after".
A closed port could in same cases get stuck in limbo due to data in
io-queue. Fixed by adding a flush callback.
|
|
The functions zlib:deflateSetDictionary/2 and zlib:inflateSetDictionary/2
accept iodata() as Dictionary.
The functions zlib:crc32/2,3, zlib:adler32/2,3, zlib:compress/1,
zlib:uncompress/1, zlib:zip/1, and zlib:unzip/1 accept iodata() as
data.
|
|
An incorrect spec, rpc:yield/1, has been fixed.
|
|
* ks/erts:
hipe_bif0.c: Remove $Id$
erts/preloaded: Add types and specs
|
|
|
|
|