mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 00:10:51 +07:00
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: Marc Boschma <marc@boschma.cx> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
1fbc2e0cfc
commit
b3bbba3570
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user