about summary refs log tree commit diff
path: root/custom_mutators/aflpp/standalone
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-07-28 13:19:21 +0200
committerGitHub <noreply@github.com>2023-07-28 13:19:21 +0200
commit57c9dfda1fabe150fad18d15ae3a49918c61fc19 (patch)
treee24935f2cebb2634cc5621ab48689b9741bfa720 /custom_mutators/aflpp/standalone
parent705cdf45fc32e6f5fcf3b8e58242ede3b99b8b6e (diff)
parentbd1648e707b85b79d816fd8737909789d7d2a09c (diff)
downloadafl++-57c9dfda1fabe150fad18d15ae3a49918c61fc19.tar.gz
Merge pull request #1815 from mark0-cn/dev
fix the file descriptor without determining null
Diffstat (limited to 'custom_mutators/aflpp/standalone')
-rw-r--r--custom_mutators/aflpp/standalone/aflpp-standalone.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/custom_mutators/aflpp/standalone/aflpp-standalone.c b/custom_mutators/aflpp/standalone/aflpp-standalone.c
index 91bac4a8..361feaba 100644
--- a/custom_mutators/aflpp/standalone/aflpp-standalone.c
+++ b/custom_mutators/aflpp/standalone/aflpp-standalone.c
@@ -39,6 +39,7 @@ my_mutator_t *afl_custom_init(afl_state_t *afl, unsigned int seed) {
   data->afl = calloc(1, sizeof(afl_state_t));
   data->afl->queue_cycle = 1;
   data->afl->fsrv.dev_urandom_fd = open("/dev/urandom", O_RDONLY);
+  if (data->afl->fsrv.dev_urandom_fd < 0) { PFATAL("Unable to open /dev/urandom"); }
   rand_set_seed(data->afl, getpid());
 
   return data;