diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-09-04 01:12:39 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-09-04 01:12:39 +0000 |
commit | eadd2de4a6e46f2d7ebf9a6d45e19ebc83fd30dd (patch) | |
tree | ec4e756c34467802fbda666d281cd2efc502a707 /usr.bin/m4 | |
parent | de510133e2a54da90e8cf63156a9296f82c3f6a2 (diff) | |
download | FreeBSD-src-eadd2de4a6e46f2d7ebf9a6d45e19ebc83fd30dd.zip FreeBSD-src-eadd2de4a6e46f2d7ebf9a6d45e19ebc83fd30dd.tar.gz |
Die on -D=foo, when parsing options - we can't let someone define (nil).
MFC after: 3 days
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 722fc92..a1cf065 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -204,6 +204,8 @@ main(int argc, char *argv[]) for (p = optarg; *p; p++) if (*p == '=') break; + if (p == optarg) + errx(1, "null variable cannot be defined"); if (*p) *p++ = EOS; dodefine(optarg, p); |