summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2012-10-12 11:28:25 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-10-16 11:14:24 -0400
commitfa5180178609053b1f36d3aa06216b22f92ec1a8 (patch)
tree62faaca17b85ee9022460c250703d34646464e12
parent5cff8244f27c270cabb24f010ef76b0096a70872 (diff)
scanner: Make sure arguments have names.
-rw-r--r--src/scanner.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scanner.c b/src/scanner.c
index 69fefb3..47c22cb 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -350,6 +350,9 @@ start_element(void *data, const char *element_name, const char **atts)
ctx->message = message;
} else if (strcmp(element_name, "arg") == 0) {
+ if (name == NULL)
+ fail(ctx, "no argument name given");
+
arg = malloc(sizeof *arg);
arg->name = strdup(name);