mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 00:20:29 +00:00
Do not accept an empty bpf program.
This commit is contained in:
parent
667d8d10c7
commit
200bc1f049
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153221
|
@ -520,6 +520,9 @@ bpf_validate(f, len)
|
|||
register int i;
|
||||
register const struct bpf_insn *p;
|
||||
|
||||
if (len < 1)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
/*
|
||||
* Check that that jumps are forward, and within
|
||||
|
|
Loading…
Reference in a new issue