]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Sun, 24 Sep 2017 13:45:34 +0000 (13:45 +0000)
committerDamien Miller <djm@mindrot.org>
Sun, 24 Sep 2017 13:46:12 +0000 (23:46 +1000)
fix inverted test on channel open failure path that
"upgraded" a transient failure into a fatal error; reported by sthen and also
seen by benno@; ok sthen@

Upstream-ID: b58b3fbb79ba224599c6cd6b60c934fc46c68472

channels.c

index 6a55d3bf305c7d01ad0fabce5264e11268018793..83442be06432cb3260a882d3abc370615a13b06d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.374 2017/09/24 09:50:01 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.375 2017/09/24 13:45:34 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3126,7 +3126,7 @@ channel_input_open_failure(int type, u_int32_t seq, struct ssh *ssh)
        if ((datafellows & SSH_BUG_OPENFAILURE) == 0) {
                /* skip language */
                if ((r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 ||
-                   (r = sshpkt_get_string_direct(ssh, NULL, NULL)) == 0) {
+                   (r = sshpkt_get_string_direct(ssh, NULL, NULL)) != 0) {
                        error("%s: message/lang: %s", __func__, ssh_err(r));
                        packet_disconnect("Invalid open failure message");
                }