diff options
author | okan | 2015-01-17 02:05:03 +0000 |
---|---|---|
committer | okan | 2015-01-17 02:05:03 +0000 |
commit | 526655bfc9928c3519a08eba2fbeb5806ae387df (patch) | |
tree | 7e95877e59a9249c766650539f234d79b039d0bf /parse.y | |
parent | f5fc14375af5a7de2561bf2f8075f106a40dbabb (diff) | |
download | cwm-526655bfc9928c3519a08eba2fbeb5806ae387df.tar.gz |
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@
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.59 2015/01/16 18:28:08 okan Exp $ */ +/* $OpenBSD: parse.y,v 1.60 2015/01/17 02:05:03 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -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"); |