diff options
| author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-12-17 22:01:18 +0300 |
|---|---|---|
| committer | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-12-18 20:30:22 +0300 |
| commit | fef304c047ddf90c41726dc139f415c70d646019 (patch) | |
| tree | ce2811b99ce5d3b919315b1c58f1c2a41ebacce7 | |
| parent | 5e48e6b76709bd7f0d520054889884b1ad8fa24c (diff) | |
| download | sparse-dev-fef304c047ddf90c41726dc139f415c70d646019.tar.gz | |
Handle missing argument to -D.
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
| -rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -248,6 +248,10 @@ static char **handle_switch_D(char *arg, char **next) { const char *name = arg + 1; const char *value = "1"; + + if (!*name || isspace(*name)) + die("argument to `-D' is missing"); + for (;;) { char c; c = *++arg; |
