fix the file descriptor without determining null

This commit is contained in:
mark0
2023-07-28 17:32:59 +08:00
parent 705cdf45fc
commit bd1648e707
3 changed files with 3 additions and 0 deletions

View File

@ -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;