bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-17 Thread Andreas Schwab
On Okt 17 2017, Pádraig Brady wrote: > Updated patch attached. I mistakenly thought getopt would > permute the argv so NULLs were at the end. The attached > caters for NULLs interspersed in the argv[]. This has nothing to do with getopt, the first pass explicitly

bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-17 Thread Paul Eggert
On 10/17/2017 12:37 AM, Pádraig Brady wrote: +#define check_argument(arg) \ + if (k == n_settings - 1 || ! settings[k+1]) \ +{ \ + error (0, 0, _("missing argument to %s"), quote (arg)); \ + usage (EXIT_FAILURE); \ +} How about making this a static function instead of a

bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-17 Thread Jim Meyering
On Tue, Oct 17, 2017 at 12:37 AM, Pádraig Brady wrote: > On 16/10/17 10:49, Jim Meyering wrote: >> On Mon, Oct 16, 2017 at 2:30 AM, Pádraig Brady wrote: >>> On 15/10/17 18:07, Jaeseung Choi wrote: Dear GNU team, While testing coreutils for

bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-17 Thread Pádraig Brady
On 16/10/17 10:49, Jim Meyering wrote: > On Mon, Oct 16, 2017 at 2:30 AM, Pádraig Brady wrote: >> On 15/10/17 18:07, Jaeseung Choi wrote: >>> Dear GNU team, >>> >>> While testing coreutils for a research purpose, we found the following >>> crash in 'stty'. Running stty with

bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-16 Thread Jim Meyering
On Mon, Oct 16, 2017 at 2:30 AM, Pádraig Brady wrote: > On 15/10/17 18:07, Jaeseung Choi wrote: >> Dear GNU team, >> >> While testing coreutils for a research purpose, we found the following >> crash in 'stty'. Running stty with the command-line "stty eol -F AA" >> raises a

bug#28859: Segmentation fault with NULL pointer dereference in 'stty'

2017-10-16 Thread Pádraig Brady
On 15/10/17 18:07, Jaeseung Choi wrote: > Dear GNU team, > > While testing coreutils for a research purpose, we found the following > crash in 'stty'. Running stty with the command-line "stty eol -F AA" > raises a crash as below. We did not change any terminal setting, and > believe the bug is