From a9ac0eb2495fd7d5f5197427cf31477023e2bdda Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 4 May 2011 15:51:47 -0400 Subject: [PATCH] scanner: Fail if there's a 'destroy' request not marked as a destructor --- wayland/scanner.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wayland/scanner.c b/wayland/scanner.c index b84cf36..b6aebdb 100644 --- a/wayland/scanner.c +++ b/wayland/scanner.c @@ -217,6 +217,9 @@ start_element(void *data, const char *element_name, const char **atts) else message->destructor = 0; + if (strcmp(name, "destroy") == 0 && !message->destructor) + fail(ctx, "destroy request should be destructor type"); + ctx->message = message; } else if (strcmp(element_name, "arg") == 0) { arg = malloc(sizeof *arg); -- 2.7.4