[krh/wayland/next 2/5] scanner: Make sure arguments have names.

John Kåre Alsaker john.kare.alsaker at gmail.com
Fri Oct 12 02:28:25 PDT 2012


---
 src/scanner.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/scanner.c b/src/scanner.c
index d68c952..0a6f233 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -348,6 +348,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);
 
-- 
1.7.12.2



More information about the wayland-devel mailing list