mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
Correctly check the filter length. I committed the wrong version.
Pointy hat to me.
This commit is contained in:
parent
dccb7faff6
commit
142f81c25d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153996
@ -520,7 +520,12 @@ bpf_validate(f, len)
|
||||
register int i;
|
||||
register const struct bpf_insn *p;
|
||||
|
||||
if (len < 1)
|
||||
/* Do not accept negative length filter. */
|
||||
if (len < 0)
|
||||
return 0;
|
||||
|
||||
/* An empty filter means accept all. */
|
||||
if (len == 0)
|
||||
return 1;
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
|
Loading…
Reference in New Issue
Block a user