summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2018-06-25 22:28:34 +0000
committerDamien Miller <djm@cvs.openbsd.org>2018-06-25 22:28:34 +0000
commit5c354e1ab0f5234f00e02abcb869f00fba540343 (patch)
tree1b93b84030de7d4ff6081aa9185abdc1ee8568c6
parent77c7e402d573b7775dd75d78a7b2ef7384b9e050 (diff)
fix NULL dereference in open_listen_match_tcpip()
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 51feb2670e8..b7d99d05cef 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -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
@@ -3847,7 +3847,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;