summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-06-25 22:28:33 +0000
committerDamien Miller <djm@mindrot.org>2018-06-26 08:30:43 +1000
commit90e51d672711c19a36573be1785caf35019ae7a8 (patch)
tree4bd9452c736c40ddff429e4ed0459009d4efb0b0 /channels.c
parentf535ff922a67d9fcc5ee69d060d1b21c8bb01d14 (diff)
upstream: fix NULL dereference in open_listen_match_tcpip()
OpenBSD-Commit-ID: c968c1d29e392352383c0f9681fcc1e93620c4a9
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels.c b/channels.c
index 1b40d7da6..83778b465 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.381 2018/06/06 18:22:41 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.382 2018/06/25 22:28:33 djm 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
@@ -3886,7 +3886,7 @@ open_listen_match_tcpip(struct permission *allowed_open,
3886 allowed_host = translate ? 3886 allowed_host = translate ?
3887 channel_rfwd_bind_host(allowed_open->listen_host) : 3887 channel_rfwd_bind_host(allowed_open->listen_host) :
3888 allowed_open->listen_host; 3888 allowed_open->listen_host;
3889 if (allowed_host == NULL || 3889 if (allowed_host == NULL || requestedhost == NULL ||
3890 strcmp(allowed_host, requestedhost) != 0) 3890 strcmp(allowed_host, requestedhost) != 0)
3891 return 0; 3891 return 0;
3892 return 1; 3892 return 1;