mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Catch up with src parse.y changes by jsg@:
Don't allow embedded nul characters in strings. Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
This commit is contained in:
parent
8d1eb202bf
commit
c412f040df
3
parse.y
3
parse.y
@ -438,6 +438,9 @@ yylex(void)
|
|||||||
} else if (c == quotec) {
|
} else if (c == quotec) {
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
break;
|
break;
|
||||||
|
} else if (c == '\0') {
|
||||||
|
yyerror("syntax error");
|
||||||
|
return (findeol());
|
||||||
}
|
}
|
||||||
if (p + 1 >= buf + sizeof(buf) - 1) {
|
if (p + 1 >= buf + sizeof(buf) - 1) {
|
||||||
yyerror("string too long");
|
yyerror("string too long");
|
||||||
|
Loading…
Reference in New Issue
Block a user