summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-01-30 00:34:01 +0000
committerDamien Miller <djm@mindrot.org>2017-01-30 12:04:10 +1100
commit4833d01591b7eb049489d9558b65f5553387ed43 (patch)
tree90265d135bf27a9fab810b9755a6f69d5733f70f
parent326e2fae9f2e3e067b5651365eba86b35ee5a6b2 (diff)
upstream commit
some explicit NULL tests when dumping configured forwardings; from Karsten Weiss Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d
-rw-r--r--readconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c
index 7194b0ccc..5064e33ee 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.264 2017/01/06 09:27:52 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.265 2017/01/30 00:34:01 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
@@ -2451,10 +2451,10 @@ dump_cfg_forwards(OpCodes code, u_int count, const struct Forward *fwds)
2451 /* oDynamicForward */ 2451 /* oDynamicForward */
2452 for (i = 0; i < count; i++) { 2452 for (i = 0; i < count; i++) {
2453 fwd = &fwds[i]; 2453 fwd = &fwds[i];
2454 if (code == oDynamicForward && 2454 if (code == oDynamicForward && fwd->connect_host != NULL &&
2455 strcmp(fwd->connect_host, "socks") != 0) 2455 strcmp(fwd->connect_host, "socks") != 0)
2456 continue; 2456 continue;
2457 if (code == oLocalForward && 2457 if (code == oLocalForward && fwd->connect_host != NULL &&
2458 strcmp(fwd->connect_host, "socks") == 0) 2458 strcmp(fwd->connect_host, "socks") == 0)
2459 continue; 2459 continue;
2460 printf("%s", lookup_opcode_name(code)); 2460 printf("%s", lookup_opcode_name(code));