1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Add __AFL_INIT() to uxplink to allow afl-fuzz to skip some startup overhead.

This commit is contained in:
Ben Harris
2015-10-17 12:25:36 +01:00
parent 389eb4b7e0
commit b9cb75e8c5

View File

@ -25,7 +25,7 @@
#define MAX_STDIN_BACKLOG 4096
void *logctx;
static void *logctx;
static struct termios orig_termios;
@ -992,6 +992,11 @@ int main(int argc, char **argv)
/* nodelay is only useful if stdin is a terminal device */
int nodelay = conf_get_int(conf, CONF_tcp_nodelay) && isatty(0);
/* This is a good place for a fuzzer to fork us. */
#ifdef __AFL_HAVE_MANUAL_CONTROL
__AFL_INIT();
#endif
error = back->init(NULL, &backhandle, conf,
conf_get_str(conf, CONF_host),
conf_get_int(conf, CONF_port),