On Wed, Dec 10, 2014 at 11:16:21AM +0100, Sébastien Marie wrote:
> Hi,
> 
> In compile_flags, the variable holding the filename ('w' flag of 's'
> command) is an array with PATH_MAX length.
> 
> We should check the size of wanted filename, before copying it in wfile.
> 
> $ echo | sed -e s/a//w`perl -e "print '_' x 10000"` 
> Bus error (core dumped)
>
> [...]
>
> +                     if (strnlen(p, PATH_MAX) == PATH_MAX)
> +                             err(COMPILE, "wfile too long");

My bad, this patch is wrong: p is the whole command (not only the wanted
filename).

I will redo it.
Sorry.
-- 
Sébastien Marie

Reply via email to