]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r222173: sh: Fix bss-based buffer overflow in . builtin.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 29 May 2011 15:07:53 +0000 (15:07 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 29 May 2011 15:07:53 +0000 (15:07 +0000)
commitc1ffd029c2302a7557b5a2a176d078219a497107
treee6632b29fb3fd48bc52d9f18db0244b78b2520ca
parent36e147999ccdf3d168a904dca82135c590d6f56c
MFC r222173: 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: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@222452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/sh/main.c