Module Name:    src
Committed By:   christos
Date:           Thu Dec  3 21:04:59 UTC 2015

Modified Files:
        src/external/bsd/dhcpcd/dist: common.c

Log Message:
CID 1341552: Fix NULL deref


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/dist/common.c
diff -u src/external/bsd/dhcpcd/dist/common.c:1.16 src/external/bsd/dhcpcd/dist/common.c:1.17
--- src/external/bsd/dhcpcd/dist/common.c:1.16	Thu Dec  3 16:04:06 2015
+++ src/external/bsd/dhcpcd/dist/common.c	Thu Dec  3 16:04:59 2015
@@ -1,5 +1,5 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: common.c,v 1.16 2015/12/03 21:04:06 christos Exp $");
+ __RCSID("$NetBSD: common.c,v 1.17 2015/12/03 21:04:59 christos Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
@@ -181,7 +181,7 @@ logger(struct dhcpcd_ctx *ctx, int pri, 
 	}
 
 	/* Don't send to syslog if dumping leases or testing */
-	if (ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST))
+	if (ctx && ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST))
 		goto out;
 
 	if (ctx && ctx->log_fd != -1) {

Reply via email to