summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-11-09 08:55:11 +0000
committermpi <mpi@openbsd.org>2016-11-09 08:55:11 +0000
commit201d28155e8584e00205fa74bf96024e66092bb5 (patch)
tree8bd8ff92cceae715709c9def8093fd680f0d9cfb /sys
parentsync (diff)
downloadwireguard-openbsd-201d28155e8584e00205fa74bf96024e66092bb5.tar.xz
wireguard-openbsd-201d28155e8584e00205fa74bf96024e66092bb5.zip
Do not dereference a variable without initializing it beforehand.
Fix a typo introduced in m_pullup(9) refactoring and found the hard way by semarie@ while testing another diff. ok mikeb@, dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 3b9d403d84d..8fcdf0f1080 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.237 2016/10/27 03:29:55 dlg Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.238 2016/11/09 08:55:11 mpi Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -896,7 +896,7 @@ m_pullup(struct mbuf *n, int len)
if (len > tail - mtod(n, caddr_t)) {
/* need to memmove to make space at the end */
memmove(head, mtod(n, caddr_t), n->m_len);
- m->m_data = head;
+ n->m_data = head;
}
len -= n->m_len;