From c412f040df05c7221537a598786e0cea4b35167f Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 17 Jan 2015 02:05:03 +0000 Subject: 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@ --- parse.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parse.y b/parse.y index 590bd44..31d094d 100644 --- a/parse.y +++ b/parse.y @@ -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"); -- cgit 1.4.1