Re: [PATCH] add missing null check in duplicate_buffered_stream()

2023-05-04 Thread Chet Ramey
On 5/3/23 7:40 PM, Emanuele Torre wrote: This was causing crashes when non-interactive shells that read stdin, either source a file that dups stdin, or run an eval command that dups stdin: Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer `

[PATCH] add missing null check in duplicate_buffered_stream()

2023-05-03 Thread Emanuele Torre
This was causing crashes when non-interactive shells that read stdin, either source a file that dups stdin, or run an eval command that dups stdin: $ bash <<< 'echo hi 9<&0' hi $ printf %s\\n 'echo hi 9<&0' > file; bash <<< '. ./file' Segmentation fault (core dumped) $ bash <<< 'eval "ec