scanner: Make sure arguments have names.

This commit is contained in:
John Kåre Alsaker 2012-10-12 11:28:25 +02:00 committed by Kristian Høgsberg
parent 5cff8244f2
commit fa51801786

View File

@ -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);