dect
/
libpcap
Archived
13
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.
This commit is contained in:
Guy Harris 2010-04-21 02:20:48 -07:00
parent e25ea10a13
commit ace1a2c86f
1 changed files with 1 additions and 1 deletions

View File

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