From: John Kåre Alsaker Date: Fri, 12 Oct 2012 09:28:25 +0000 (+0200) Subject: scanner: Make sure arguments have names. X-Git-Tag: 1.0.0~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa5180178609053b1f36d3aa06216b22f92ec1a8;p=platform%2Fupstream%2Fwayland.git scanner: Make sure arguments have names. --- 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);