DragonFly BSD
DragonFly commits List (threaded) for 2010-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Sep 2010 15:30:36 -0700 (PDT)

commit 5bd0853245defc31dd20f12ea567749800e54e72
Author: Matthew Dillon <dillon@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@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]