Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Avoid coredump for
details: https://anonhg.NetBSD.org/src/rev/129064c3a2a4
branches: trunk
changeset: 349398:129064c3a2a4
user: sjg <sjg%NetBSD.org@localhost>
date: Fri Dec 09 22:56:21 2016 +0000
description:
Avoid coredump for
(FOO) = fu
reported by Ori Bernstein
diffstat:
usr.bin/make/parse.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r f7a9763c4059 -r 129064c3a2a4 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Fri Dec 09 22:50:10 2016 +0000
+++ b/usr.bin/make/parse.c Fri Dec 09 22:56:21 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.216 2016/12/07 15:00:46 christos Exp $ */
+/* $NetBSD: parse.c,v 1.217 2016/12/09 22:56:21 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.216 2016/12/07 15:00:46 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.217 2016/12/09 22:56:21 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.216 2016/12/07 15:00:46 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.217 2016/12/09 22:56:21 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -1851,7 +1851,7 @@
* XXX Rather than counting () and {} we should look for $ and
* then expand the variable.
*/
- for (depth = 0, cp = line + 1; depth != 0 || *cp != '='; cp++) {
+ for (depth = 0, cp = line + 1; depth > 0 || *cp != '='; cp++) {
if (*cp == '(' || *cp == '{') {
depth++;
continue;
Home |
Main Index |
Thread Index |
Old Index