Skip to content

Commit b20fda2

Browse files
authored
Use /dev/urandom instead of /dev/null for probing valid memory (#1586)
1 parent 583c84a commit b20fda2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libafl_targets/src/cmplog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static long area_is_valid(const void *ptr, size_t len) {
6060
valid_len = (long)len;
6161
#elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
6262
if (!dymmy_initialized) {
63-
if ((dummy_fd[1] = open("/dev/null", O_WRONLY)) < 0) {
63+
if ((dummy_fd[1] = open("/dev/urandom", O_WRONLY)) < 0) {
6464
if (pipe(dummy_fd) < 0) { dummy_fd[1] = 1; }
6565
}
6666
dymmy_initialized = 1;

0 commit comments

Comments
 (0)