This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] posix: Clear close-on-exec for posix_spawn adddup2 (BZ#23640)
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: adhemerval dot zanella at linaro dot org
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 04 Jan 2019 22:37:06 +0100
- Subject: Re: [PATCH 2/2] posix: Clear close-on-exec for posix_spawn adddup2 (BZ#23640)
- References: <20180919224624.3920-1-adhemerval.zanella@linaro.org> <20180919224624.3920-2-adhemerval.zanella@linaro.org>
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."