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:
okan 2015-01-17 02:05:03 +00:00
parent 8d1eb202bf
commit c412f040df

View File

@ -438,6 +438,9 @@ yylex(void)
} else if (c == quotec) {
*p = '\0';
break;
} else if (c == '\0') {
yyerror("syntax error");
return (findeol());
}
if (p + 1 >= buf + sizeof(buf) - 1) {
yyerror("string too long");