aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/zlib_drv.c
AgeCommit message (Collapse)Author
2017-09-05Replace the zlib driver with a NIFJohn Högberg
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.
2017-05-04Update copyright yearRaimo Niskanen
2017-01-17erts: Fix zlib crash on mac for inflateGetDictionarySverker Eriksson
Work around broken build system by checking actual zlib version in runtime.
2016-08-22zlib: Only link inflateGetDictionary if availableGuilherme Andrade
Which at the moment means zlib versions >= 1.2.8.
2016-07-23zlib: support extraction of inflation dictionaryGuilherme Andrade
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2015-02-12Add zlib limited output buffer size functionalityСергей Прохоров
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). ```
2014-03-21zlib: Fix adler32_combine/4 and crc32_combine/4Björn Gustavsson
Since our config.h is included in each source file in the zlib directory, we must make sure that config.h is also included every time zlib functions are called to ensure that definitions of types are consistent. zlib_drv.c did not include config.h, which caused problems on a MacOS X Leopard system. What happened was that HAVE_UNISTD_H was not defined when zlib.h was included. When unistd.h is not known to exist, the type z_off_t will be set to a long (32 bits on this platform). But when the zlib source files were compiled, HAVE_UNISTD_H was defined, unistd.h would be included, and z_off_t would be set to off_t (64 bits; defined in unistd.h). As a result of the mismatch, calls to the adler32_combine() and crc32_combine() would pass only 32 bits in the len2 argument when 64 bits were expected.
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-03-04erts: gcc ansi does not allow 'inline'Björn-Egil Dahlberg
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-15Fix port leaks in zlibSverker Eriksson
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.
2011-12-09erl_driver.h: Enlarge types on driver callbacks output, control and callRaimo Niskanen
2010-05-02Merge branch 'bg/remove-stray-ose-support' into devErlang/OTP
* bg/remove-stray-ose-support: configure: Remove stray OSE/Delta support Makefiles: Remove stray OSE/Delta support kernel tests: Remove stray OSE/Delta support system tests: Remove stray OSE/Delta support erl_interface tests: Remove stray OSE/Delta support epmd: Remove stray OSE/Delta support epmd: #ifdef out start_epmd() for other platforms than VxWorks emulator tests: Remove stray OSE/Delta support emulator: Remove stray OSE/Delta support emulator: Eliminate #ifdef for sys_tty_reset() test_server: Remove stray support for OSE/Delta OTP-8585 bg/remove-stray-ose-support
2010-04-30emulator tests: Remove stray OSE/Delta supportBjörn Gustavsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP