Currently, argv[0] is used in regression tests and command line tools only, and it is not in libraries. But, I'll try to think of that. Thanks.
On Fri, Jul 20, 2018 at 05:56:07AM -0600, Theo de Raadt wrote: > Disagree with this. argv[0] could be a long path, which could info > disclose directory hierarchy into a context that bounces stderr to > the wrong place. > > Instead, the Windows compat should have a have a getprogname() stub > which does the right thing. > > Kinichiro Inoguchi <[email protected]> wrote: > > > To run regress bnaddsub on Windows, I would like to supersede getprogname > > with argv[0] since it is not on Windows. > > > > OK ? > > > > Index: regress/lib/libcrypto/bn/addsub/bnaddsub.c > > =================================================================== > > RCS file: /cvs/src/regress/lib/libcrypto/bn/addsub/bnaddsub.c,v > > retrieving revision 1.1 > > diff -u -p -u -p -r1.1 bnaddsub.c > > --- regress/lib/libcrypto/bn/addsub/bnaddsub.c 10 Jul 2018 16:57:50 > > -0000 1.1 > > +++ regress/lib/libcrypto/bn/addsub/bnaddsub.c 17 Jul 2018 13:01:08 > > -0000 > > @@ -216,7 +216,7 @@ main(int argc, char *argv[]) > > > > if ((bio_err = BIO_new_fp(stderr, BIO_NOCLOSE)) == NULL) { > > fprintf(stderr, "%s: failed to initialize bio_err", > > - getprogname()); > > + argv[0]); > > return 1; > > } > > > >
