summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile.in2
-rw-r--r--fuzz/fuzz-common.c4
-rw-r--r--fuzz/fuzz-harness.c3
-rw-r--r--fuzz/fuzz-sshpacketmutator.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index 0476124..113a0fb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -290,7 +290,7 @@ fuzzstandalone: fuzz/fuzz-harness.o fuzz-targets
fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS)
$(FUZZ_TARGETS): $(FUZZ_OBJS) $(allobjs) $(LIBTOM_DEPS)
- $(CXX) $(CXXFLAGS) fuzz/$@.o $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) -lcrypt
+ $(CXX) $(CXXFLAGS) fuzz/$@.o $(LDFLAGS) $(allobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@
# fuzzers that use the custom mutator - these expect a SSH network stream
MUTATOR_FUZZERS=fuzzer-client fuzzer-client_nomaths \
diff --git a/fuzz/fuzz-common.c b/fuzz/fuzz-common.c
index 3f8d081..18e8a29 100644
--- a/fuzz/fuzz-common.c
+++ b/fuzz/fuzz-common.c
@@ -239,7 +239,7 @@ int fuzz_run_preauth(const uint8_t *Data, size_t Size, int skip_kexmaths) {
}
uint32_t wrapseed;
- genrandom(&wrapseed, sizeof(wrapseed));
+ genrandom((void*)&wrapseed, sizeof(wrapseed));
wrapfd_setseed(wrapseed);
int fakesock = wrapfd_new();
@@ -275,7 +275,7 @@ int fuzz_run_client(const uint8_t *Data, size_t Size, int skip_kexmaths) {
ses.kexstate.donefirstkex = 1;
uint32_t wrapseed;
- genrandom(&wrapseed, sizeof(wrapseed));
+ genrandom((void*)&wrapseed, sizeof(wrapseed));
wrapfd_setseed(wrapseed);
int fakesock = wrapfd_new();
diff --git a/fuzz/fuzz-harness.c b/fuzz/fuzz-harness.c
index 36905d6..331a88c 100644
--- a/fuzz/fuzz-harness.c
+++ b/fuzz/fuzz-harness.c
@@ -47,7 +47,8 @@ int main(int argc, char ** argv) {
return 0;
}
-size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize) {
+// Just to let it link
+size_t LLVMFuzzerMutate(uint8_t *UNUSED(Data), size_t UNUSED(Size), size_t UNUSED(MaxSize)) {
printf("standalone fuzzer harness shouldn't call LLVMFuzzerMutate");
abort();
return 0;
diff --git a/fuzz/fuzz-sshpacketmutator.c b/fuzz/fuzz-sshpacketmutator.c
index 4ad60ef..d22dc07 100644
--- a/fuzz/fuzz-sshpacketmutator.c
+++ b/fuzz/fuzz-sshpacketmutator.c
@@ -285,7 +285,7 @@ size_t LLVMFuzzerCustomCrossOver(const uint8_t *Data1, size_t Size1,
unsigned int num_out = min_out + nrand48(randstate) % (max_out-min_out+1);
for (i = 0; i < num_out; i++) {
- int choose = nrand48(randstate) % (num_packets1 + num_packets2);
+ unsigned int choose = nrand48(randstate) % (num_packets1 + num_packets2);
buffer *p = NULL;
if (choose < num_packets1) {
p = packets1[choose];