git: userland - sysctl - Fix stack overflow

Samuel Greear sjg at crater.dragonflybsd.org
Mon Sep 6 20:13:23 PDT 2010


commit aa25ccfaa7de73dd1331329e34cdf8ef1f25e9c9
Author: Samuel J. Greear <sjg at thesjg.com>
Date:   Tue Sep 7 03:09:25 2010 +0000

    userland - sysctl - Fix stack overflow
    
    * alloca(3) was being used to allocate space for a call to sysctl(3) that
      returned data. This could occasionally be on the order of 50-100MB
      (net.inet.tcp.pcblist) resulting in a segfault.

Summary of changes:
 sbin/sysctl/sysctl.c |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/aa25ccfaa7de73dd1331329e34cdf8ef1f25e9c9


-- 
DragonFly BSD source repository





More information about the Commits mailing list