git: mbuf: Avoid kmalloc "limit" overflow

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Jan 15 20:13:56 PST 2012


commit 430919cb8bf1887637da50f7cfe2f25800127f93
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Mon Jan 16 11:51:54 2012 +0800

    mbuf: Avoid kmalloc "limit" overflow
    
    Cast stack variable cl_limit and mb_limit to size_t when calculate
    the kmalloc limit, so large kern.ipc.nmbclusters will not cause
    the calculated value overflow.

Summary of changes:
 sys/kern/uipc_mbuf.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/430919cb8bf1887637da50f7cfe2f25800127f93


-- 
DragonFly BSD source repository





More information about the Commits mailing list