diff options
author | otto <otto@openbsd.org> | 2010-04-21 16:49:34 +0000 |
---|---|---|
committer | otto <otto@openbsd.org> | 2010-04-21 16:49:34 +0000 |
commit | ce66601f95aa110e3ccc68a79b8bbe0e889b6e0a (patch) | |
tree | 5f0bbe381e31e64b16f4e9973a25b6bf4f07147e /sys/net/bpf_filter.c | |
parent | <sys/systm.h> required now. (diff) | |
download | wireguard-openbsd-ce66601f95aa110e3ccc68a79b8bbe0e889b6e0a.tar.xz wireguard-openbsd-ce66601f95aa110e3ccc68a79b8bbe0e889b6e0a.zip |
Fix validation of div by constant; from Guy Harris; ok deraadt@ miod@
Diffstat (limited to 'sys/net/bpf_filter.c')
-rw-r--r-- | sys/net/bpf_filter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/bpf_filter.c b/sys/net/bpf_filter.c index 79cf51f1ded..a558828ff72 100644 --- a/sys/net/bpf_filter.c +++ b/sys/net/bpf_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf_filter.c,v 1.20 2008/01/02 00:31:50 canacar Exp $ */ +/* $OpenBSD: bpf_filter.c,v 1.21 2010/04/21 16:49:34 otto Exp $ */ /* $NetBSD: bpf_filter.c,v 1.12 1996/02/13 22:00:00 christos Exp $ */ /* @@ -541,7 +541,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: |