libradamsa fix

This commit is contained in:
Dominik Maier
2020-04-16 16:05:39 +02:00
parent 8511638afb
commit 1ee224652c
3 changed files with 6 additions and 7 deletions

View File

@ -27,9 +27,6 @@
#include "afl-fuzz.h" #include "afl-fuzz.h"
void load_custom_mutator(afl_state_t *, const char *); void load_custom_mutator(afl_state_t *, const char *);
#ifdef USE_PYTHON
void load_custom_mutator_py(afl_state_t *, char *);
#endif
void setup_custom_mutator(afl_state_t *afl) { void setup_custom_mutator(afl_state_t *afl) {

View File

@ -1841,6 +1841,8 @@ static const unsigned char heap[] = {2,3,4,105,111,116,97,2,3,7,112,97,116,116,1
#include <stdio.h> #include <stdio.h>
#include <netdb.h> #include <netdb.h>
#include "./radamsa.h"
#ifndef EMULTIHOP #ifndef EMULTIHOP
#define EMULTIHOP -1 #define EMULTIHOP -1
#endif #endif
@ -30757,7 +30759,7 @@ static void setup(int nwords, int nobjs) {
memend = memstart + nwords - MEMPAD; memend = memstart + nwords - MEMPAD;
} }
int secondary(int nargs, char **argv) { static int secondary(int nargs, char **argv) {
word *prog; word *prog;
int rval, nobjs=0, nwords=0; int rval, nobjs=0, nwords=0;
find_heap(&nargs, &argv, &nobjs, &nwords); find_heap(&nargs, &argv, &nobjs, &nwords);

View File

@ -1,13 +1,13 @@
#include <inttypes.h> #include <inttypes.h>
#include <stddef.h> #include <stddef.h>
extern void radamsa_init(void); void radamsa_init(void);
extern size_t radamsa(uint8_t *ptr, size_t len, size_t radamsa(uint8_t *ptr, size_t len,
uint8_t *target, size_t max, uint8_t *target, size_t max,
unsigned int seed); unsigned int seed);
extern size_t radamsa_inplace(uint8_t *ptr, size_t radamsa_inplace(uint8_t *ptr,
size_t len, size_t len,
size_t max, size_t max,
unsigned int seed); unsigned int seed);