Do not accept an empty bpf program.

This commit is contained in:
Jung-uk Kim 2005-12-08 00:05:03 +00:00
parent 667d8d10c7
commit 200bc1f049
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153221

View file

@ -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