diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2004-04-12 20:05:11 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2004-04-12 20:05:11 +0000 |
commit | 57d9d1d762b2fa2dac5dd11a1e88890e2ec0e7c7 (patch) | |
tree | e8ff68da99c3035dd0a41164e7054d388f6d0976 /usr.bin/make/suff.c | |
parent | ff356053a1d3026ec9e4beaab9f10ce55f9ddf9a (diff) | |
download | src-57d9d1d762b2fa2dac5dd11a1e88890e2ec0e7c7.tar.gz src-57d9d1d762b2fa2dac5dd11a1e88890e2ec0e7c7.zip |
The .DEFAULT target with no commands caused a null pointer dereference.
PR: bin/63405
Obtained from: NetBSD
Notes
Notes:
svn path=/head/; revision=128165
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r-- | usr.bin/make/suff.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index b1f68c8ec5a1..bd02152b5bfb 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)); |