only show banner when cli_opts.quiet is not set

This commit is contained in:
HansH111 2022-03-13 14:21:13 +00:00 committed by Matt Johnston
parent 360d60fb34
commit 488ffce133

View File

@ -85,6 +85,7 @@ void recv_msg_userauth_banner() {
banner = buf_getstring(ses.payload, &bannerlen);
buf_eatstring(ses.payload); /* The language string */
if (cli_opts.quiet == 0) {
if (bannerlen > MAX_BANNER_SIZE) {
TRACE(("recv_msg_userauth_banner: bannerlen too long: %d", bannerlen))
truncated = 1;
@ -109,7 +110,7 @@ void recv_msg_userauth_banner() {
if (truncated) {
fprintf(stderr, "[Banner from the server is too long]\n");
}
}
m_free(banner);
TRACE(("leave recv_msg_userauth_banner"))
}