summaryrefslogtreecommitdiff
path: root/sys/netiso
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-24 03:59:01 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-24 03:59:01 +0000
commit30563810d4e26639ae8088e4ea92ece395bc45bf (patch)
tree42478a10b965fce938dc21634b573442099103ec /sys/netiso
parentd9913c2bbc47390d625093fba86422b1b56b6a3d (diff)
Dereference mbuf after validity check (tedu@heorot.stanford.edu)
Diffstat (limited to 'sys/netiso')
-rw-r--r--sys/netiso/tp_emit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netiso/tp_emit.c b/sys/netiso/tp_emit.c
index a8b66cc2603..a8f454ec198 100644
--- a/sys/netiso/tp_emit.c
+++ b/sys/netiso/tp_emit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tp_emit.c,v 1.5 2001/05/22 19:02:36 angelos Exp $ */
+/* $OpenBSD: tp_emit.c,v 1.6 2001/05/24 03:59:00 angelos Exp $ */
/* $NetBSD: tp_emit.c,v 1.8 1996/03/16 23:13:48 christos Exp $ */
/*-
@@ -206,13 +206,13 @@ tp_emit(dutype, tpcb, seq, eot, data)
} else {
MGETHDR(m, M_DONTWAIT, TPMT_TPHDR);
}
- m->m_data += max_hdr;
if (m == NULL) {
if (data != (struct mbuf *) 0)
m_freem(data);
error = ENOBUFS;
goto done;
}
+ m->m_data += max_hdr;
m->m_len = sizeof(struct tpdu);
m->m_act = MNULL;