Module Name: src Committed By: sjg Date: Thu Aug 11 19:53:18 UTC 2016
Modified Files: src/usr.bin/make: main.c Log Message: PR: 51405 Description: addErrorCMD: in compat mode, cmdp may be NULL, skip it and stop the calls (return 1). To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.249 src/usr.bin/make/main.c:1.250 --- src/usr.bin/make/main.c:1.249 Wed Aug 10 23:49:12 2016 +++ src/usr.bin/make/main.c Thu Aug 11 19:53:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.249 2016/08/10 23:49:12 sjg Exp $ */ +/* $NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.249 2016/08/10 23:49:12 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.249 2016/08/10 23:49:12 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.250 2016/08/11 19:53:17 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1892,6 +1892,8 @@ PrintAddr(void *a, void *b) static int addErrorCMD(void *cmdp, void *gnp) { + if (cmdp == NULL) + return 1; /* stop */ Var_Append(".ERROR_CMD", cmdp, VAR_GLOBAL); return 0; }