aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-09-14 18:34:53 +0200
committerAndreas Schneider <mail@cynapses.org>2009-09-14 19:01:20 +0200
commit6a3d31acb7af06b72b1c81d53f7f3cf7ff7ba9f1 (patch)
treef59f8450ed35be95336f84688f9a2bee3ebe3f4a /libssh
parentf28352707ab8aa7e1717cea53e4cdcf46f1dc156 (diff)
downloadlibssh-6a3d31acb7af06b72b1c81d53f7f3cf7ff7ba9f1.tar.gz
libssh-6a3d31acb7af06b72b1c81d53f7f3cf7ff7ba9f1.tar.xz
libssh-6a3d31acb7af06b72b1c81d53f7f3cf7ff7ba9f1.zip
Fix a possible stack overflow in agent code.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/agent.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libssh/agent.c b/libssh/agent.c
index ca5de97d..3a8954eb 100644
--- a/libssh/agent.c
+++ b/libssh/agent.c
@@ -210,10 +210,7 @@ static int agent_talk(struct ssh_session_struct *session,
/* send length and then the request packet */
if (atomicio(session->agent->sock, payload, 4, 0) == 4) {
- buffer_get_data(request, payload, len);
- ssh_log(session, SSH_LOG_PACKET,
- "agent_talk - sending request, payload[0] = %u", payload[0]);
- if (atomicio(session->agent->sock, payload, len, 0)
+ if (atomicio(session->agent->sock, buffer_get_rest(request), len, 0)
!= len) {
ssh_log(session, SSH_LOG_PACKET, "atomicio sending request failed: %s",
strerror(errno));