mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
fuzz harness
--HG-- branch : fuzz
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "bignum.h"
|
||||
#include "dbrandom.h"
|
||||
#include "runopts.h"
|
||||
#include "fuzz.h"
|
||||
|
||||
|
||||
/* this is used to generate unique output from the same hashpool */
|
||||
@@ -147,7 +148,7 @@ void addrandom(unsigned char * buf, unsigned int len)
|
||||
hash_state hs;
|
||||
|
||||
#ifdef DROPBEAR_FUZZ
|
||||
if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
|
||||
if (fuzz.fuzzing || fuzz.recordf) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -165,7 +166,7 @@ void addrandom(unsigned char * buf, unsigned int len)
|
||||
static void write_urandom()
|
||||
{
|
||||
#ifdef DROPBEAR_FUZZ
|
||||
if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
|
||||
if (fuzz.fuzzing || fuzz.recordf) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -203,7 +204,7 @@ void seedrandom() {
|
||||
clock_t clockval;
|
||||
|
||||
#ifdef DROPBEAR_FUZZ
|
||||
if (opts.fuzz.fuzzing || opts.fuzz.recordf) {
|
||||
if (fuzz.fuzzing || fuzz.recordf) {
|
||||
seedfuzz();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user