From: dtucker Date: Wed, 3 Aug 2016 04:23:55 +0000 (+0000) Subject: Fix bug introduced in rev 1.467 which causes "buffer_get_bignum_ret: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=66a147833433fdd72fef739d44673f802e120c5d;p=openbsd Fix bug introduced in rev 1.467 which causes "buffer_get_bignum_ret: incomplete message" errors when built with WITH_SSH1 and run such that no Protocol 1 ephemeral host key is generated (eg "Protocol 2", no SSH1 host key supplied). Reported by rainer.laatsch at t-online.de, ok deraadt@ --- diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 8001ce9ff18..762ba218860 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.470 2016/05/24 04:43:45 dtucker Exp $ */ +/* $OpenBSD: sshd.c,v 1.471 2016/08/03 04:23:55 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1032,7 +1032,7 @@ send_rexec_state(int fd, struct sshbuf *conf) fatal("%s: buffer error: %s", __func__, ssh_err(r)); } else #endif - if ((r = sshbuf_put_u32(m, 1)) != 0) + if ((r = sshbuf_put_u32(m, 0)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); if (ssh_msg_send(fd, 0, m) == -1)