Mercurial > dropbear
diff dbutil.c @ 1383:f03cfe9c76ac fuzz
Disable setnonblocking(), get_socket_address(), set_sock_priority()
for fuzzing
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 26 May 2017 22:10:51 +0800 |
parents | d8215479a58a |
children | 6c92e97553f1 |
line wrap: on
line diff
--- a/dbutil.c Fri May 26 22:09:30 2017 +0800 +++ b/dbutil.c Fri May 26 22:10:51 2017 +0800 @@ -531,22 +531,21 @@ TRACE(("setnonblocking: %d", fd)) +#ifdef DROPBEAR_FUZZ + if (fuzz.fuzzing) { + return; + } +#endif + if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { if (errno == ENODEV) { /* Some devices (like /dev/null redirected in) * can't be set to non-blocking */ TRACE(("ignoring ENODEV for setnonblocking")) } else { -#ifdef DROPBEAR_FUZZ - if (fuzz.fuzzing) - { - TRACE(("fuzzing ignore setnonblocking failure for %d", fd)) - } - else -#endif - { - dropbear_exit("Couldn't set nonblocking"); - } + { + dropbear_exit("Couldn't set nonblocking"); + } } } TRACE(("leave setnonblocking"))