Mercurial > dropbear
comparison cli-session.c @ 1742:6e71440b1e47 fuzz
Add fuzzer-client_nomaths, fix client fuzzer
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 18 Oct 2020 15:08:54 +0800 |
parents | d1b279aa5ed1 |
children | 1fc0012b9c38 |
comparison
equal
deleted
inserted
replaced
1741:d1b279aa5ed1 | 1742:6e71440b1e47 |
---|---|
350 /* Ignore return value since there's nothing we can do */ | 350 /* Ignore return value since there's nothing we can do */ |
351 (void)fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); | 351 (void)fcntl(cli_ses.stdincopy, F_SETFL, cli_ses.stdinflags); |
352 (void)fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); | 352 (void)fcntl(cli_ses.stdoutcopy, F_SETFL, cli_ses.stdoutflags); |
353 (void)fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); | 353 (void)fcntl(cli_ses.stderrcopy, F_SETFL, cli_ses.stderrflags); |
354 | 354 |
355 /* Don't leak */ | |
356 m_close(cli_ses.stdincopy); | |
357 m_close(cli_ses.stdoutcopy); | |
358 m_close(cli_ses.stderrcopy); | |
359 | |
355 cli_tty_cleanup(); | 360 cli_tty_cleanup(); |
356 if (cli_ses.server_sig_algs) { | 361 if (cli_ses.server_sig_algs) { |
357 buf_free(cli_ses.server_sig_algs); | 362 buf_free(cli_ses.server_sig_algs); |
358 } | 363 } |
359 } | 364 } |
428 cli_opts.remoteport, exitmsg); | 433 cli_opts.remoteport, exitmsg); |
429 } | 434 } |
430 | 435 |
431 /* Do the cleanup first, since then the terminal will be reset */ | 436 /* Do the cleanup first, since then the terminal will be reset */ |
432 session_cleanup(); | 437 session_cleanup(); |
433 /* Avoid printing onwards from terminal cruft */ | 438 |
434 fprintf(stderr, "\n"); | |
435 | |
436 dropbear_log(LOG_INFO, "%s", fullmsg); | |
437 | |
438 #if DROPBEAR_FUZZ | 439 #if DROPBEAR_FUZZ |
439 if (fuzz.do_jmp) { | 440 if (fuzz.do_jmp) { |
440 longjmp(fuzz.jmp, 1); | 441 longjmp(fuzz.jmp, 1); |
441 } | 442 } |
442 #endif | 443 #endif |
443 | 444 |
445 /* Avoid printing onwards from terminal cruft */ | |
446 fprintf(stderr, "\n"); | |
447 | |
448 dropbear_log(LOG_INFO, "%s", fullmsg); | |
449 | |
444 exit(exitcode); | 450 exit(exitcode); |
445 } | 451 } |
446 | 452 |
447 void cli_dropbear_log(int priority, const char* format, va_list param) { | 453 void cli_dropbear_log(int priority, const char* format, va_list param) { |
448 | 454 |