summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-04-12 20:05:11 +0000
committerru <ru@FreeBSD.org>2004-04-12 20:05:11 +0000
commit01487d9cea3d5d83bec7ada358dd14c5bae93e4f (patch)
treee8ff68da99c3035dd0a41164e7054d388f6d0976 /usr.bin
parent4e1b51a160de27f8fb88cd49270f1f20010da54a (diff)
downloadFreeBSD-src-01487d9cea3d5d83bec7ada358dd14c5bae93e4f.zip
FreeBSD-src-01487d9cea3d5d83bec7ada358dd14c5bae93e4f.tar.gz
The .DEFAULT target with no commands caused a null pointer dereference.
PR: bin/63405 Obtained from: NetBSD
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/suff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index b1f68c8..bd02152 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -635,7 +635,12 @@ Suff_EndTransform(void *gnp, void *dummy __unused)
{
Suff *s, *t;
- (void)SuffParseTransform(gn->name, &s, &t);
+ /*
+ * SuffParseTransform() may fail for special rules which are not
+ * actual transformation rules (e.g., .DEFAULT).
+ */
+ if (!SuffParseTransform(gn->name, &s, &t))
+ return (0);
DEBUGF(SUFF, ("deleting transformation from `%s' to `%s'\n",
s->name, t->name));
OpenPOWER on IntegriCloud