summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2018-07-16 07:49:31 +0000
committermpi <mpi@openbsd.org>2018-07-16 07:49:31 +0000
commit1e2c197e80c8913a6ad6c7684f95eef2a3ddc6e3 (patch)
tree3c703d5dbca73f415b443c350a743f76b5278c28
parenttypos, from Michael W. Bombardieri. (diff)
downloadwireguard-openbsd-1e2c197e80c8913a6ad6c7684f95eef2a3ddc6e3.tar.xz
wireguard-openbsd-1e2c197e80c8913a6ad6c7684f95eef2a3ddc6e3.zip
Fix for uninitialized variables.
Found by and ok jsg@, ok markus@
-rw-r--r--sys/netinet/ip_ipcomp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index 3e83110e320..a5770ae44d4 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.63 2018/07/12 15:51:50 mpi Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.64 2018/07/16 07:49:31 mpi Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -195,6 +195,9 @@ ipcomp_input_cb(struct tdb *tdb, struct tdb_crypto *tc, struct mbuf *m, int clen
NET_ASSERT_LOCKED();
+ skip = tc->tc_skip;
+ protoff = tc->tc_protoff;
+
/* update the counters */
tdb->tdb_cur_bytes += m->m_pkthdr.len - (skip + hlen);
ipcompstat_add(ipcomps_ibytes, m->m_pkthdr.len - (skip + hlen));
@@ -213,9 +216,6 @@ ipcomp_input_cb(struct tdb *tdb, struct tdb_crypto *tc, struct mbuf *m, int clen
tdb->tdb_flags &= ~TDBF_SOFT_BYTES; /* Turn off checking */
}
- skip = tc->tc_skip;
- protoff = tc->tc_protoff;
-
/* In case it's not done already, adjust the size of the mbuf chain */
m->m_pkthdr.len = clen + hlen + skip;