From 1e2c197e80c8913a6ad6c7684f95eef2a3ddc6e3 Mon Sep 17 00:00:00 2001 From: mpi Date: Mon, 16 Jul 2018 07:49:31 +0000 Subject: [PATCH] Fix for uninitialized variables. Found by and ok jsg@, ok markus@ --- sys/netinet/ip_ipcomp.c | 8 ++++---- 1 file 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; -- 2.20.1