Range is 0-7, not 0-9, otherwise parser silently excludes it from the strtol() rather than throwing an error.
Reported-by: Marc Boschma <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Song Liu <[email protected]> --- tools/bpf/bpf_exp.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpf_exp.l b/tools/bpf/bpf_exp.l index bd83149..4da8d05 100644 --- a/tools/bpf/bpf_exp.l +++ b/tools/bpf/bpf_exp.l @@ -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; } -- 2.9.5
