dect
/
libpcap
Archived
1
0
Fork 0

Fix check for a constant 0 argument to BPF_DIV.

BPV_RVAL() is the macro to check the type of the return value of a "ret"
instruction; it tests more bits than are appropriate for a "div"
instruction, and the test fails.
master
Guy Harris 13 years ago
parent e25ea10a13
commit ace1a2c86f
  1. 2
      bpf/net/bpf_filter.c

@ -608,7 +608,7 @@ bpf_validate(f, len)
/*
* Check for constant division by 0.
*/
if (BPF_RVAL(p->code) == BPF_K && p->k == 0)
if (BPF_SRC(p->code) == BPF_K && p->k == 0)
return 0;
break;
default: