summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsg@openbsd.org <jsg@openbsd.org>2015-03-11 00:48:39 +0000
committerDamien Miller <djm@mindrot.org>2015-03-23 17:07:36 +1100
commit1cb3016635898d287e9d58b50c430995652d5358 (patch)
tree15dbcb89e853e23b93119fb5f7ad5c0848184df5
parent4d24b3b6a4a6383e05e7da26d183b79fa8663697 (diff)
upstream commit
add back the changes from rev 1.206, djm reverted this by mistake in rev 1.207
-rw-r--r--packet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index b1219c85b..5e18de437 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.208 2015/02/13 18:57:00 markus Exp $ */ 1/* $OpenBSD: packet.c,v 1.209 2015/03/11 00:48:39 jsg Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -290,6 +290,7 @@ ssh_packet_set_connection(struct ssh *ssh, int fd_in, int fd_out)
290 (r = cipher_init(&state->receive_context, none, 290 (r = cipher_init(&state->receive_context, none,
291 (const u_char *)"", 0, NULL, 0, CIPHER_DECRYPT)) != 0) { 291 (const u_char *)"", 0, NULL, 0, CIPHER_DECRYPT)) != 0) {
292 error("%s: cipher_init failed: %s", __func__, ssh_err(r)); 292 error("%s: cipher_init failed: %s", __func__, ssh_err(r));
293 free(ssh);
293 return NULL; 294 return NULL;
294 } 295 }
295 state->newkeys[MODE_IN] = state->newkeys[MODE_OUT] = NULL; 296 state->newkeys[MODE_IN] = state->newkeys[MODE_OUT] = NULL;
@@ -1278,8 +1279,10 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
1278 * Since we are blocking, ensure that all written packets have 1279 * Since we are blocking, ensure that all written packets have
1279 * been sent. 1280 * been sent.
1280 */ 1281 */
1281 if ((r = ssh_packet_write_wait(ssh)) != 0) 1282 if ((r = ssh_packet_write_wait(ssh)) != 0) {
1283 free(setp);
1282 return r; 1284 return r;
1285 }
1283 1286
1284 /* Stay in the loop until we have received a complete packet. */ 1287 /* Stay in the loop until we have received a complete packet. */
1285 for (;;) { 1288 for (;;) {