1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

session.c: Correct a typo which may lead to stack overflow (#533)

File: session.c

Notes:
Seems the author intend to terminate banner_dup buffer, later, print it to the debug console.

Author:
Tseng Jun
This commit is contained in:
Tseng Jun
2020-11-12 03:18:36 +08:00
committed by GitHub
parent 6c7769dcc4
commit cfe0bf6498

View File

@@ -219,7 +219,7 @@ banner_send(LIBSSH2_SESSION * session)
}
else {
memcpy(banner_dup, banner, 255);
banner[255] = '\0';
banner_dup[255] = '\0';
}
_libssh2_debug(session, LIBSSH2_TRACE_TRANS, "Sending Banner: %s",