Re: Potential buffer under-run in shell_execve()

2016-08-16 Thread Chet Ramey
On 8/13/16 10:01 PM, John E. Malmberg wrote: > Hello, > > In Bash 4.3.42: > > In execute_cmd/shell_execve(), if HAVE_BASH_BANG_EXEC is defined, the macro > READ_SAMPLE_BUF has the potential to set sample_len to -1. > > #if defined (HAVE_HASH_BANG_EXEC) > READ_SAMPLE_BUF (command, sampl

Potential buffer under-run in shell_execve()

2016-08-15 Thread John E. Malmberg
Hello, In Bash 4.3.42: In execute_cmd/shell_execve(), if HAVE_BASH_BANG_EXEC is defined, the macro READ_SAMPLE_BUF has the potential to set sample_len to -1. #if defined (HAVE_HASH_BANG_EXEC) READ_SAMPLE_BUF (command, sample, sample_len); sample[sample_len - 1] = '\0'; Th