提交 b3bbba35 编写于 作者: D Daniel Borkmann 提交者: Alexei Starovoitov

bpf: fix cbpf parser bug for octal numbers

Range is 0-7, not 0-9, otherwise parser silently excludes it from the
strtol() rather than throwing an error.
Reported-by: NMarc Boschma <marc@boschma.cx>
Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
Acked-by: NAlexei Starovoitov <ast@kernel.org>
Acked-by: NSong Liu <songliubraving@fb.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
上级 1fbc2e0c
......@@ -175,7 +175,7 @@ extern void yyerror(const char *str);
yylval.number = strtol(yytext, NULL, 10);
return number;
}
([0][0-9]+) {
([0][0-7]+) {
yylval.number = strtol(yytext + 1, NULL, 8);
return number;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册