This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] posix: Clear close-on-exec for posix_spawn adddup2 (BZ#23640)


On Sep 19 2018, adhemerval.zanella@linaro.org wrote:

> @@ -141,21 +156,24 @@ do_test (int argc, char *argv[])
>         + "--library-path"	optional
>         + the library path	optional
>         + the application name
> -     - five parameters left if called through re-execution
> +     - six parameters left if called through re-execution
>         + file descriptor number which is supposed to be closed
>         + the open file descriptor
>         + the newly opened file descriptor
> -       + thhe duped second descriptor
> +       + the duped second descriptor
>         + the name of the closed descriptor
> +       + the duped fourth dile descriptor which O_CLOEXEC should be

s/dile/file/

> @@ -202,6 +228,7 @@ do_test (int argc, char *argv[])
>    spargv[i++] = fd3name;
>    spargv[i++] = fd4name;
>    spargv[i++] = name1;
> +  spargv[i++] = fd5name;
>    spargv[i] = NULL;

This overruns spargv.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]