]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix NULL dereference in open_listen_match_tcpip()
authordjm@openbsd.org <djm@openbsd.org>
Mon, 25 Jun 2018 22:28:33 +0000 (22:28 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 25 Jun 2018 22:30:43 +0000 (08:30 +1000)
OpenBSD-Commit-ID: c968c1d29e392352383c0f9681fcc1e93620c4a9

channels.c

index 1b40d7da6dd098e8553f66aff62d43535683b72b..83778b465a4f1ab2543afaf2094bef9c6303dc7d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.381 2018/06/06 18:22:41 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.382 2018/06/25 22:28:33 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3886,7 +3886,7 @@ open_listen_match_tcpip(struct permission *allowed_open,
        allowed_host = translate ?
            channel_rfwd_bind_host(allowed_open->listen_host) :
            allowed_open->listen_host;
-       if (allowed_host == NULL ||
+       if (allowed_host == NULL || requestedhost == NULL ||
            strcmp(allowed_host, requestedhost) != 0)
                return 0;
        return 1;