From 4fa8675d8ee4c3fc5147a9af8e0de393c1486f79 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sat, 19 Jun 2004 13:34:31 +0000 Subject: avoid a null pointer dereference if the .DEFAULT target has no commands; ok espie@ --- usr.bin/make/suff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/make/suff.c') diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 834f7b9916c..82a92d6319d 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: suff.c,v 1.52 2004/05/05 09:10:47 espie Exp $ */ +/* $OpenBSD: suff.c,v 1.53 2004/06/19 13:34:30 robert Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* @@ -600,7 +600,8 @@ Suff_EndTransform(void *gnp) { Suff *s, *t; - (void)SuffParseTransform(gn->name, &s, &t); + if (!SuffParseTransform(gn->name, &s, &t)) + return; if (DEBUG(SUFF)) { printf("deleting transformation from `%s' to `%s'\n", -- cgit v1.2.3