mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
scanner: Reject version 0
It is not valid in Wayland. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
parent
60b34a6fcb
commit
2a122485b3
1 changed files with 2 additions and 0 deletions
|
|
@ -752,6 +752,8 @@ start_element(void *data, const char *element_name, const char **atts)
|
|||
version = strtouint(atts[i + 1]);
|
||||
if (version == -1)
|
||||
fail(&ctx->loc, "wrong version (%s)", atts[i + 1]);
|
||||
if (version == 0)
|
||||
fail(&ctx->loc, "version 0 is invalid");
|
||||
} else if (strcmp(atts[i], "type") == 0)
|
||||
type = atts[i + 1];
|
||||
else if (strcmp(atts[i], "value") == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue