Commit Graph

2513 Commits

Author SHA1 Message Date
Nick Terrell
e474aa55b4 Fix decompression buffer overrun
Allows an adversary to write up to 3 bytes beyond the end of the buffer.
Occurs if the match overlaps the `extDict` and `currentPrefix`, and the
match length in the `currentPrefix` is less than `MINMATCH`, and
`op-(16-MINMATCH) >= oMatchEnd > op-16`.
2016-12-12 18:05:30 -08:00
Dimitry Andric
83cc2fb083 Enable using isatty() and nanosleep() on *BSD 2016-12-12 19:24:51 +01:00
Dimitry Andric
12df6da83b Fix running test suite on FreeBSD
* Remove last bashism from tests/playTests.sh
* Use gmd5sum from the sysutils/coreutils port
2016-12-12 19:22:47 +01:00
Yann Collet
4c6ce5a57e Merge pull request #476 from inikep/dev11
Dev11
2016-12-12 16:44:55 +01:00
Przemyslaw Skibinski
c855da7533 allow all operationg systems with _POSIX_C_SOURCE >= 200112L 2016-12-12 15:37:43 +01:00
Przemyslaw Skibinski
242c036875 turn on the '-r' option for HP-UX and AIX 2016-12-12 11:59:17 +01:00
Przemyslaw Skibinski
c01ac6c30a turn on the '-r' option for *BSD and Solaris 2016-12-12 11:23:21 +01:00
Yann Collet
fda539f50b minor coding style changes 2016-12-12 01:03:23 +01:00
Yann Collet
c3a5c4bef8 introduced cycleLog 2016-12-12 00:47:30 +01:00
Yann Collet
c261f71f6a minor variation of rescale fix 2016-12-12 00:25:07 +01:00
Yann Collet
e93f1f5893 Merge pull request #474 from terrelln/compression-segfault
Fix compression segfault
2016-12-11 22:28:24 +01:00
Nick Terrell
b547d212a1 Fix longmatch test build errors. 2016-12-10 23:17:36 -08:00
Nick Terrell
5cc85cf183 Switch uint64_t to U64 2016-12-10 19:31:55 -08:00
Nick Terrell
0acae734f1 Add exposing test case 2016-12-10 19:12:13 -08:00
Nick Terrell
3826207a70 Simplify segfault fix
Take advantage of the fact that `chainLog <= windowLog`.
2016-12-10 18:46:55 -08:00
Nick Terrell
0012332ce0 Fix compression segfault
When the overflow protection kicks in, it makes sure that ip - ctx->base
isn't too large.  However, it didn't ensure that saved offsets are
still valid.  This change ensures that any valid offsets (<= windowLog)
are still representable after the update.

The bug would shop up on line 1056, when `offset_1 > current + 1`, which
causes an underflow.  This in turn, would cause a segfault on line 1063.

The input must necessarily be longer than 1 GB for this issue to occur.
Even then, it only occurs if one of the last 3 matches is larger than
the chain size and block size.
2016-12-09 17:15:33 -08:00
Yann Collet
383b8088a3 minor lib build refactoring 2016-12-08 18:42:27 -08:00
Yann Collet
6e754fe76a fixed lib soname.
example : simple_compression : size overflow check
2016-12-08 18:26:56 -08:00
Yann Collet
16a5752588 streaming example uses stable API 2016-12-08 17:28:26 -08:00
Yann Collet
ef013f0edc Merge branch 'dev' of github.com:facebook/zstd into dev 2016-12-08 12:07:06 -08:00
Yann Collet
229b9e2996 Merge pull request #473 from inikep/dev11
improved documentation
2016-12-08 11:36:38 -08:00
Przemyslaw Skibinski
1d54feb171 use newer make with AppVeyor 2016-12-08 14:00:09 +01:00
Przemyslaw Skibinski
128acb35db improved MSYS support 2016-12-08 10:49:59 +01:00
Przemyslaw Skibinski
13de72e0cc programs\Makefile: use Linux paths 2016-12-08 10:43:55 +01:00
Przemyslaw Skibinski
7687913178 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-12-08 10:42:42 +01:00
Przemyslaw Skibinski
6323d0050f VS projects: restored zbuff for libzstd* 2016-12-08 09:06:00 +01:00
Yann Collet
d2908b9215 updated NEWS 2016-12-07 16:41:33 -08:00
Yann Collet
426a9d4b71 changed : dll : only approved ZSTD symbols are now exposed. All other symbols remain internal. 2016-12-07 16:39:34 -08:00
Yann Collet
c0a1d6deb0 better cleaning 2016-12-07 15:58:32 -08:00
Yann Collet
08611a9f64 removed make artefact 2016-12-07 14:04:39 +01:00
Przemyslaw Skibinski
4da53219a0 zstd Manual updated to 1.1.2 2016-12-07 11:18:40 +01:00
Przemyslaw Skibinski
abd9ec0d53 gen_html: comments of type /*= and /**= can be longer than a single line 2016-12-07 11:13:20 +01:00
Przemyslaw Skibinski
c37b8cb609 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-12-07 09:13:47 +01:00
Yann Collet
2a826e592b compatibility with zstd-frugal (noBench mode) 2016-12-06 17:56:20 -08:00
Yann Collet
e63c631aaf decode benchmark, multi-files 2016-12-06 17:46:49 -08:00
Yann Collet
d946501d2c decode benchmark - single file (hidden option) 2016-12-06 16:49:23 -08:00
Yann Collet
1628fe08fc cmake : SHARED_LIBRARY_OUTPUT_NAME is user-selectable, by @aparamon (#469) 2016-12-06 13:45:42 -08:00
Yann Collet
94d1a93d28 changed environment variable comparison to sh compatible 2016-12-06 12:02:56 -08:00
Yann Collet
6b9a983261 changed gzstd build messages 2016-12-06 11:23:25 -08:00
Yann Collet
379908be3d fixed zstd.h for manual 2016-12-06 10:36:15 -08:00
Yann Collet
9dfd0af164 ZBUFF_ as a wrapper to ZSTD streaming API. 2016-12-06 17:16:41 +01:00
Przemyslaw Skibinski
95f34e056a zlibWrapper/README.md: updated info about gzip file access functions 2016-12-06 11:36:24 +01:00
Przemyslaw Skibinski
23a1e11360 Merge remote-tracking branch 'refs/remotes/facebook/dev' into dev11 2016-12-06 11:11:20 +01:00
Yann Collet
a0d4031e7c fixed cmake build 2016-12-06 09:46:14 +01:00
Yann Collet
73ab42252b fixed zbuff in VS2005 projects 2016-12-06 09:08:43 +01:00
Yann Collet
2f902f946c fixed zlibwrapper use of xxh 2016-12-06 08:52:53 +01:00
Yann Collet
f586bdfe23 fixed fuzzer test 2016-12-06 06:11:46 +01:00
Yann Collet
825dffbc43 moved zbuff source files into lib/deprecated 2016-12-05 19:28:19 -08:00
Yann Collet
8f8e2b0b4a fixed initialization warning 2016-12-05 18:00:50 -08:00
Yann Collet
e7a41a5955 added : dictID retrieval functions.
added : unit tests for dictID retrieval functions
2016-12-05 16:21:06 -08:00