summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-06-08 17:23:20 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-06-08 17:23:20 +0000
commitf8b5b20dcaa28ca47835a72a8c01a1d586c8301d (patch)
treed3e147e750eca7a8346360b249abe45e3eb0ced1 /sys
parent20d768012e4a380c2f1a8bf40e34272522902e23 (diff)
null pointer check before deref
almost nobody ran into that because it is ipv6 only
Diffstat (limited to 'sys')
-rw-r--r--sys/net/pf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 197dbf2d3c0..b221da330e1 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.579 2008/06/02 11:38:22 mcbride Exp $ */
+/* $OpenBSD: pf.c,v 1.580 2008/06/08 17:23:19 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -3058,7 +3058,8 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction,
goto cleanup;
}
- bip_sum = *pd->ip_sum;
+ if (pd->ip_sum)
+ bip_sum = *pd->ip_sum;
switch (pd->proto) {
case IPPROTO_TCP: