git: sh: Fix bss-based buffer overflow in . builtin.

Peter Avalos pavalos at crater.dragonflybsd.org
Sun Aug 21 16:33:01 PDT 2011


commit 332546d32a797c819b3a1804e66be73417674ff1
Author: Peter Avalos <pavalos at dragonflybsd.org>
Date:   Sun Aug 21 12:27:39 2011 -0700

    sh: Fix bss-based buffer overflow in . builtin.
    
    If the length of a directory in PATH together with the given filename
    exceeded FILENAME_MAX (which may happen even for pathnames that work), a
    static buffer was overflown.
    
    The static buffer is unnecessary, we can use the stalloc() stack.
    
    Obtained-from:     FreeBSD 222173

Summary of changes:
 bin/sh/main.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/332546d32a797c819b3a1804e66be73417674ff1


-- 
DragonFly BSD source repository





More information about the Commits mailing list