diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2012-10-12 11:28:25 +0200 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-16 11:14:24 -0400 |
| commit | fa5180178609053b1f36d3aa06216b22f92ec1a8 (patch) | |
| tree | 62faaca17b85ee9022460c250703d34646464e12 /src/scanner.c | |
| parent | connection: Don't call memcpy with null pointer. (diff) | |
| download | wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar.gz wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar.bz2 wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar.lz wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar.xz wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.tar.zst wayland-fa5180178609053b1f36d3aa06216b22f92ec1a8.zip | |
scanner: Make sure arguments have names.
Diffstat (limited to 'src/scanner.c')
| -rw-r--r-- | src/scanner.c | 3 |
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); |
