git: network - Zero out m_len / m_pkthdr.len in m_get*() and friends

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Sep 17 15:32:12 PDT 2010


commit 5bd0853245defc31dd20f12ea567749800e54e72
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Sep 17 15:29:22 2010 -0700

    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 at web.de>

Summary of changes:
 sys/dev/netif/fxp/if_fxp.c |    8 +++++---
 sys/kern/uipc_mbuf.c       |    5 +++++
 2 files changed, 10 insertions(+), 3 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5bd0853245defc31dd20f12ea567749800e54e72


-- 
DragonFly BSD source repository





More information about the Commits mailing list