network - Zero out m_len / m_pkthdr.len in m_get*() and friends
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 17 Sep 2010 22:29:22 +0000 (15:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 17 Sep 2010 22:29:22 +0000 (15:29 -0700)
commit5bd0853245defc31dd20f12ea567749800e54e72
treebc56314bcb792fa04b55373e849cacffee2c10c7
parent25f7e8f42b6a8b808f38aa3c265cbc2f56b95dfa
network - Zero out m_len / m_pkthdr.len in m_get*() and friends

* Newly allocated mbufs now set m_len and (if a packet header)
  m_pkthdr.len to 0 instead of leaving them uninitialized,
  allowing us to assert that the mbuf does not have an overrun
  later when it is freed.

Reported-by: Jan Lentfer <Jan.Lentfer@web.de>
sys/dev/netif/fxp/if_fxp.c
sys/kern/uipc_mbuf.c