diff options
| author | milo <milo.sshiva@gmail.com> | 2009-07-28 18:01:07 +0200 |
|---|---|---|
| committer | Andreas Schneider <mail@cynapses.org> | 2009-08-07 11:38:18 +0200 |
| commit | 74eff86a6bb54e9c44eae5bbb6d3b396a9f18a85 (patch) | |
| tree | 646ab1241803eba56191983969ee1da58372bed6 /libssh/server.c | |
| parent | 232aca896906112e7e0e3206f4ec4835c5ad306a (diff) | |
Fix possible memory corruption (#14)
Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'libssh/server.c')
| -rw-r--r-- | libssh/server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libssh/server.c b/libssh/server.c index 25021f68..50af4ff9 100644 --- a/libssh/server.c +++ b/libssh/server.c @@ -424,7 +424,7 @@ static int dh_handshake_server(SSH_SESSION *session) { buffer_add_ssh_string(session->out_buffer, f) < 0 || buffer_add_ssh_string(session->out_buffer, sign) < 0) { ssh_set_error(session, SSH_FATAL, "Not enough space"); - buffer_free(session->out_buffer); + buffer_reinit(session->out_buffer); string_free(f); string_free(sign); return -1; @@ -437,7 +437,7 @@ static int dh_handshake_server(SSH_SESSION *session) { } if (buffer_add_u8(session->out_buffer, SSH2_MSG_NEWKEYS) < 0) { - buffer_free(session->out_buffer); + buffer_reinit(session->out_buffer); return -1; } |
