689 Commits

Author SHA1 Message Date
012baa84b1 Also include <sys/select.h> where available 2017-04-16 23:12:50 +02:00
91da7e10c1 Only include <alloca.h> if available 2017-04-16 23:11:11 +02:00
Sam Hocevar
192812ef51 Fix a possible crash in the getopt_long reimplementation. 2016-09-20 08:57:14 +02:00
Sam Hocevar
6ca3b49e69 Add missing configure checks for getopt.h and getopt_long. 2016-09-20 08:56:54 +02:00
Sam Hocevar
e049a4336e Fix help message layout. 2016-09-20 08:56:19 +02:00
Sam Hocevar
574b1bb8a5 Quick fix for wrong mmap data size calculation.
This patch addresses #16 but needs more work and a regression test
before the issue can be closed.
2016-07-03 13:29:50 +02:00
Sam Hocevar
eeed494c4b Make sure to distribute README.md with tarballs. 2016-07-03 13:10:33 +02:00
Sam Hocevar
171cf4fa41 Merge pull request #15 from funman/master
Fix 32 bits overflow with -M option
2016-06-03 01:01:57 +02:00
Rafaël Carré
a37e3d8af4 Fix 32 bits overflow with -M option
$ zzuf -M 4096 -s 0:1 /bin/cat
/bin/cat: Argument list too long
2016-06-03 00:20:12 +02:00
Sam Hocevar
14138cd218 Merge pull request #13 from archey/master
Added _DEFAULT_SOURCE to fix compilation warnings on gcc 5.
2016-05-04 15:29:00 +02:00
arch3y
91ca149479 added _DEFAULT_SOURCE to fix compilation warnings on gcc 5 2016-05-03 21:47:34 -04:00
Sam Hocevar
012da78b04 Prepare 0.15 release. 2016-05-03 08:19:12 +02:00
Sam Hocevar
418fae2ab6 Do not use rand() within fseek(), it might break reproducibility. 2016-05-03 08:05:14 +02:00
Sam Hocevar
e413984095 Work around an issue with fseek() diversion. Closes #7.
When diverting functions that handle FILE objects, we try to detect whether
the internal buffer contents have changed and therefore need to be fuzzed.
In recent glibc versions, it may happen that an fseek() call is made that
should not invalidate the internal buffer, yet a read() call is still performed.

This is arguably a bug. Considering the following code:

    f = fopen("/dev/null", "r");
    fread(ptr, 1, 1, f);
    fseek(f, 1, SEEK_SET);

The following system calls are made, where the second read() call is
completely unnecessary and is the cause for the buffer refill:

    read(..., 4096);
    lseek(0, SEEK_SET);
    read(..., 4096);

In order to work around this problem, we fill the internal buffer with random
data before calling fseek(), we check whether any bytes have changed, then we
restore it if it was left untouched. This is not 100% robust but honestly it
will do for now.
2016-05-02 19:55:00 +02:00
Sam Hocevar
a4625ca02b More verbose debug messages. 2016-05-02 00:15:51 +02:00
Sam Hocevar
dd94449e75 Merge pull request #12 from edmcman/feature/retain_file_extension_in_copy_mode
Retain file extension in copy mode.
2016-02-07 14:00:25 +01:00
Edward J. Schwartz
17f2ef46b2 Also include alloca.h 2016-02-05 11:16:01 -05:00
Will Dormann
f25eafa586 Retain file extension in copy mode. 2016-02-05 11:06:38 -05:00
Sam Hocevar
cc872b8062 Merge pull request #11 from CERTCC-Vulnerability-Analysis/feature/add_opmode_null_to_run_without_fuzzing
Add new "null" opmode which doesn't mutate the file.
2016-02-03 20:36:17 +01:00
Will Dormann
f3280455ea Add new "null" opmode which doesn't mutate the file. 2016-02-03 13:52:23 -05:00
Sam Hocevar
d16576b2ba Export VERBOSE=1 in Travis so that the test suite outputs debug information. 2015-11-07 13:22:52 +01:00
Sam Hocevar
b426e7104d Add #pragma once directives in all our headers, for safety. 2015-11-07 13:13:12 +01:00
Sam Hocevar
1658b4f59b Tell Travis to try to build on OS X, too. 2015-11-07 13:08:02 +01:00
Sam Hocevar
37e6d87770 Add Travis build status to README. 2015-11-07 12:58:40 +01:00
Sam Hocevar
4a86ff8c36 Move Travis builds to the container-based infrastructure. 2015-11-07 12:51:14 +01:00
Sam Hocevar
efb7046411 Tell Travis to bootstrap before running configure. 2015-11-07 12:39:32 +01:00
Sam Hocevar
5f0e0253aa Add a .travis.yml configuration file for CI. 2015-11-07 12:37:13 +01:00
Sam Hocevar
c49f4f17bf Disable the mmap regression test on OS X. 2015-08-16 23:02:31 +02:00
Sam Hocevar
cec3584c95 Hopefully fix OS X compilation now. Fixes #5. 2015-08-05 09:13:18 +02:00
Sam Hocevar
613fb6e64e Disable unnecessary weak symbol declaration.
If we don’t use dlfcn.h, there is no need for our libasan workaround,
so just disable it.
2015-08-02 19:40:15 +02:00
Sam Hocevar
ad61125c41 Merge pull request #4 from x9prototype/master
Update libzzuf/lib-stream.c
2015-07-22 08:27:02 +02:00
Jeff
a8ea1fb693 Merge pull request #1 from x9prototype/x9prototype-patch-1
Update libzzuf/lib-stream.c
2015-07-21 15:41:21 -07:00
Jeff
9eb78c602c Update libzzuf/lib-stream.c
Added missing semi-colon so compile succeeds.
2015-07-21 15:39:30 -07:00
Sam Hocevar
1b20e81b94 zzuf: set program version to 0.14 and prepare release. 2015-05-30 18:48:35 +02:00
Sam Hocevar
baf828863b win32: using <stdint.h> instead of defining our own types.
This used to be necessary back in 2008 but nowadays Visual Studio provides
enough C99 support for us.
2015-05-30 17:38:02 +02:00
Sam Hocevar
1c7ffee4a2 misc: fix a few minor issues found by static code analysis. 2015-05-30 16:42:25 +02:00
Sam Hocevar
73ec5ee6e4 sys: unsatisfying workaround for an issue with libasan. 2015-01-29 09:34:18 +01:00
Sam Hocevar
923fffb27f win32: clean up some Windows code. 2015-01-29 03:12:36 +01:00
Sam Hocevar
bad2925778 libzzuf: protect library initialisation with a mutex. 2015-01-29 03:12:36 +01:00
Sam Hocevar
cc2cb7e305 build: remove spurious binary file. 2015-01-29 03:12:36 +01:00
Sam Hocevar
ad11cdd72a libzzuf: fix compiler warnings by adding declarations for functions
that are unlikely to be exposed by system headers.
2015-01-26 01:29:53 +01:00
Sam Hocevar
56b013a605 Allow debug_str to be provided a negative length count for convenience. 2015-01-24 16:01:29 +01:00
Sam Hocevar
c88842f9a4 zzuf: fix a minor inconsistency between short and long options when
compiled on a system with a useless rlimit().
2015-01-21 08:11:37 +01:00
Sam Hocevar
13f63b0419 doc: group command line options by category in the man page. 2015-01-21 08:10:37 +01:00
Sam Hocevar
6ccb82a9ff stream: fix a nasty bug that completely messed up with the streambuf
structure tracking. Now when the new streambuf position is exactly at
the end of the previous streambuf, we only fuzz the streambuf if new
data is available (i.e. when streambuf_count != 0); otherwise, it just
means that we’re at the end of the file, waiting for new read orders.
2015-01-20 11:20:23 +01:00
Sam Hocevar
1d0fd3c370 debug: minor tweak to the debug string formatter. 2015-01-20 00:08:59 +01:00
Sam Hocevar
a5bb4b567e debug: refactor a lot of buffer debug functions using a shared formatter. 2015-01-19 23:54:58 +01:00
Sam Hocevar
60e1d2f001 test: use the -d flag in unit tests so that we can find potential
errors in the debug() function calls.
2015-01-19 23:10:14 +01:00
Sam Hocevar
d8d799cd81 misc: rename a lot of _zz_-prefixed variables. 2015-01-19 14:12:58 +01:00
Sam Hocevar
2c9718bd04 test: add a regression test for a bug in our mmap function. 2015-01-19 10:25:20 +01:00