From 710769f0a9ed6b758bbf7ffa217c21b47f31a8a6 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 11 Aug 2017 08:22:22 -0400 Subject: Move FuzzerSetRand to separate file. Use an inline rand.inc; this fixes Google's OSS-Fuzz builds. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/4141) --- fuzz/test-corpus.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'fuzz/test-corpus.c') diff --git a/fuzz/test-corpus.c b/fuzz/test-corpus.c index a876f209c9..9cef01f86d 100644 --- a/fuzz/test-corpus.c +++ b/fuzz/test-corpus.c @@ -18,39 +18,8 @@ #include #include #include -#include #include "fuzzer.h" -static int fuzz_bytes(unsigned char *buf, int num) -{ - unsigned char val = 1; - - while (--num >= 0) - *buf++ = val++; - return 1; -} - -static int fuzz_status(void) -{ - return 1; -} - -static RAND_METHOD fuzz_rand_method = { - NULL, - fuzz_bytes, - NULL, - NULL, - fuzz_bytes, - fuzz_status -}; - -void FuzzerSetRand(void) -{ - RAND_set_rand_method(&fuzz_rand_method); -} - - - int main(int argc, char **argv) { int n; -- cgit v1.2.3