summaryrefslogtreecommitdiff
path: root/sys/net/pf_norm.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-05-09 00:16:39 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-05-09 00:16:39 +0000
commitdd00845b7b8b459e705440fe64d4532988369743 (patch)
treee78d37fa8417c21ac28dd46fef7de6e0b460ba83 /sys/net/pf_norm.c
parent4afddfb7b7deaa4e4620bcb76465c20cfe4229ab (diff)
Don't dereference scrub pointer when it's NULL, fix PR 3775, from
Marc Huber. ok deraadt@
Diffstat (limited to 'sys/net/pf_norm.c')
-rw-r--r--sys/net/pf_norm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index f95c57f9682..a6528496fb2 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.85 2004/05/05 23:16:03 frantzen Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.86 2004/05/09 00:16:38 dhartmei Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -1738,7 +1738,7 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
* TCP streams immedietly after the 3whs and don't timestamp their
* packets (seen in a WWW accelerator or cache).
*/
- if (pd->p_len > 0 && (src->scrub->pfss_flags &
+ if (pd->p_len > 0 && src->scrub && (src->scrub->pfss_flags &
(PFSS_TIMESTAMP|PFSS_DATA_TS|PFSS_DATA_NOTS)) == PFSS_TIMESTAMP) {
if (got_ts)
src->scrub->pfss_flags |= PFSS_DATA_TS;