[PATCH v4] Cygwin: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
Previously, the number of command line args was not checked for cygwin process. Due to this, segmentation fault was caused if too many command line args are specified. https://cygwin.com/pipermail/cygwin/2023-August/254333.html Since char *argv[argc + 1] is placed on the stack in dll_crt0_1(),

[PATCH] Cygwin: termios: Refactor the function is_console_app().

2023-08-28 Thread Takashi Yano
Signed-off-by: Takashi Yano --- winsup/cygwin/fhandler/termios.cc | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler/termios.cc b/winsup/cygwin/fhandler/termios.cc index 789ae0179..d106955dc 100644 ---

[PATCH] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
Previously, the number of command line args was not checked for cygwin process. Due to this, segmentation fault was caused if too many command line args are specified. https://cygwin.com/pipermail/cygwin/2023-August/254333.html Since char *argv[argc + 1] is placed on the stack in dll_crt0_1(),

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 18:46, Takashi Yano wrote: > Previously, the number of command line args was not checked for > cygwin process. Due to this, segmentation fault was caused if too > many command line args are specified. > https://cygwin.com/pipermail/cygwin/2023-August/254333.html > > Since char

Re: [PATCH] Cygwin: termios: Refactor the function is_console_app().

2023-08-28 Thread Corinna Vinschen
On Aug 28 18:21, Takashi Yano wrote: > Signed-off-by: Takashi Yano > --- > winsup/cygwin/fhandler/termios.cc | 18 -- > 1 file changed, 8 insertions(+), 10 deletions(-) > > diff --git a/winsup/cygwin/fhandler/termios.cc > b/winsup/cygwin/fhandler/termios.cc > index

[PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
Previously, the number of command line args was not checked for cygwin process. Due to this, segmentation fault was caused if too many command line args are specified. https://cygwin.com/pipermail/cygwin/2023-August/254333.html Since char *argv[argc + 1] is placed on the stack in dll_crt0_1(),

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 12:57, Corinna Vinschen wrote: > On Aug 28 18:46, Takashi Yano wrote: > > Previously, the number of command line args was not checked for > > cygwin process. Due to this, segmentation fault was caused if too > > many command line args are specified. > >

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Corinna Vinschen
On Aug 28 13:09, Corinna Vinschen wrote: > On Aug 28 12:57, Corinna Vinschen wrote: > > On Aug 28 18:46, Takashi Yano wrote: > > > Previously, the number of command line args was not checked for > > > cygwin process. Due to this, segmentation fault was caused if too > > > many command line args

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 12:57:19 +0200 Corinna Vinschen wrote: > On Aug 28 18:46, Takashi Yano wrote: > > Previously, the number of command line args was not checked for > > cygwin process. Due to this, segmentation fault was caused if too > > many command line args are specified. > >

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 12:57:19 +0200 Corinna Vinschen wrote: > - char *newargv[__argc + 1]; > - char **nav = newargv; > - char **oav = __argv; > - while ((*nav++ = *oav++) != NULL) > - continue; > + char **newargv = (char **) malloc ((__argc + 1) * sizeof (char **)); > +

Re: [PATCH] Cygwin: termios: Refactor the function is_console_app().

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 12:58:31 +0200 Corinna Vinschen wrote: > On Aug 28 18:21, Takashi Yano wrote: > > Signed-off-by: Takashi Yano > > --- > > winsup/cygwin/fhandler/termios.cc | 18 -- > > 1 file changed, 8 insertions(+), 10 deletions(-) > > > > diff --git

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 12:57:19 +0200 Corinna Vinschen wrote: > On Aug 28 18:46, Takashi Yano wrote: > > Previously, the number of command line args was not checked for > > cygwin process. Due to this, segmentation fault was caused if too > > many command line args are specified. > >

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 13:09:18 +0200 Corinna Vinschen wrote: > On Aug 28 12:57, Corinna Vinschen wrote: > > On Aug 28 18:46, Takashi Yano wrote: > > > Previously, the number of command line args was not checked for > > > cygwin process. Due to this, segmentation fault was caused if too > > > many

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
On Mon, 28 Aug 2023 21:09:53 +0900 Takashi Yano wrote: > On Mon, 28 Aug 2023 12:57:19 +0200 > Corinna Vinschen wrote: > > On Aug 28 18:46, Takashi Yano wrote: > > > Previously, the number of command line args was not checked for > > > cygwin process. Due to this, segmentation fault was caused if

Re: [PATCH v2] Cygwin: spawn: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
Hi Corinna, On Mon, 28 Aug 2023 21:27:09 +0900 Takashi Yano wrote: > On Mon, 28 Aug 2023 12:57:19 +0200 > Corinna Vinschen wrote: > > On Aug 28 18:46, Takashi Yano wrote: > > > Previously, the number of command line args was not checked for > > > cygwin process. Due to this, segmentation fault

[PATCH v3] Cygwin: Fix segfalt when too many command line args are specified.

2023-08-28 Thread Takashi Yano
Previously, the number of command line args was not checked for cygwin process. Due to this, segmentation fault was caused if too many command line args are specified. https://cygwin.com/pipermail/cygwin/2023-August/254333.html Since char *argv[argc + 1] is placed on the stack in dll_crt0_1(),