mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Fixed potential format string attacks
Potential format string attacks on error reporting in channels.c
This commit is contained in:
committed by
Andreas Schneider
parent
3873489688
commit
39c7e3c7dd
@@ -315,7 +315,7 @@ static void channel_rcv_change_window(SSH_SESSION *session) {
|
|||||||
|
|
||||||
channel = channel_from_msg(session);
|
channel = channel_from_msg(session);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
ssh_log(session, SSH_LOG_FUNCTIONS, ssh_get_error(session));
|
ssh_log(session, SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = buffer_get_u32(session->in_buffer, &bytes);
|
rc = buffer_get_u32(session->in_buffer, &bytes);
|
||||||
@@ -413,7 +413,7 @@ static void channel_rcv_eof(SSH_SESSION *session) {
|
|||||||
|
|
||||||
channel = channel_from_msg(session);
|
channel = channel_from_msg(session);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
ssh_log(session, SSH_LOG_FUNCTIONS, ssh_get_error(session));
|
ssh_log(session, SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
|
||||||
leave_function();
|
leave_function();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -435,7 +435,7 @@ static void channel_rcv_close(SSH_SESSION *session) {
|
|||||||
|
|
||||||
channel = channel_from_msg(session);
|
channel = channel_from_msg(session);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
ssh_log(session, SSH_LOG_FUNCTIONS, ssh_get_error(session));
|
ssh_log(session, SSH_LOG_FUNCTIONS, "%s", ssh_get_error(session));
|
||||||
leave_function();
|
leave_function();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -477,7 +477,7 @@ static void channel_rcv_request(SSH_SESSION *session) {
|
|||||||
|
|
||||||
channel = channel_from_msg(session);
|
channel = channel_from_msg(session);
|
||||||
if (channel == NULL) {
|
if (channel == NULL) {
|
||||||
ssh_log(session, SSH_LOG_FUNCTIONS, ssh_get_error(session));
|
ssh_log(session, SSH_LOG_FUNCTIONS,"%s", ssh_get_error(session));
|
||||||
leave_function();
|
leave_function();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user