* Set minimal fuzzing ratio to 0.000000001% (less than one bit changed on
a whole DVD).
This commit is contained in:
parent
81d43c778d
commit
db40102a66
@ -111,8 +111,8 @@ void _zz_fuzz(int fd, volatile uint8_t *buf, int64_t len)
|
||||
memset(fuzz->data, 0, CHUNKBYTES);
|
||||
|
||||
/* Add some random dithering to handle ratio < 1.0/CHUNKBYTES */
|
||||
todo = (int)((fuzz->ratio * (8 * CHUNKBYTES * 1000)
|
||||
+ _zz_rand(1000)) / 1000.0);
|
||||
todo = (int)((fuzz->ratio * (8 * CHUNKBYTES) * 1000000.0
|
||||
+ _zz_rand(1000000)) / 1000000.0);
|
||||
while(todo--)
|
||||
{
|
||||
unsigned int idx = _zz_rand(CHUNKBYTES);
|
||||
|
||||
@ -25,9 +25,10 @@
|
||||
/* Default seed is 0. Why not? */
|
||||
#define DEFAULT_SEED 0
|
||||
|
||||
/* The default fuzzing ratio is, arbitrarily, 0.4% */
|
||||
/* The default fuzzing ratio is, arbitrarily, 0.4%. The minimal fuzzing
|
||||
* ratio is 0.000000001% (less than one bit changed on a whole DVD). */
|
||||
#define DEFAULT_RATIO 0.004
|
||||
#define MIN_RATIO 0.00001
|
||||
#define MIN_RATIO 0.00000000001
|
||||
#define MAX_RATIO 5.0
|
||||
|
||||
struct fuzz
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user