From 39c7e3c7dd7a00ce9e32cc29a8fc1d8b58ddc1a7 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 17 Jun 2009 23:42:07 +0200 Subject: Fixed potential format string attacks Potential format string attacks on error reporting in channels.c --- libssh/channels.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libssh/channels.c b/libssh/channels.c index 6bf68446..d637ee1c 100644 --- a/libssh/channels.c +++ b/libssh/channels.c @@ -315,7 +315,7 @@ static void channel_rcv_change_window(SSH_SESSION *session) { channel = channel_from_msg(session); 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); @@ -413,7 +413,7 @@ static void channel_rcv_eof(SSH_SESSION *session) { channel = channel_from_msg(session); 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(); return; } @@ -435,7 +435,7 @@ static void channel_rcv_close(SSH_SESSION *session) { channel = channel_from_msg(session); 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(); return; } @@ -477,7 +477,7 @@ static void channel_rcv_request(SSH_SESSION *session) { channel = channel_from_msg(session); 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(); return; } -- cgit v1.2.3