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

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


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Aug 2011 16:32:11 -0700 (PDT)

commit 332546d32a797c819b3a1804e66be73417674ff1
Author: Peter Avalos <pavalos@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



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