|
Message-Id: <20170107093147.dc30d64f61e5ec441c34ffd4f788e58e.a683212f25.wbe@email15.godaddy.com>
Date: Sat, 07 Jan 2017 09:31:47 -0700
From: <writeonce@...ipix.org>
To: musl@...ts.openwall.com
Subject: RE: bug in getopt_long()
>
>
> -------- Original Message --------
> Subject: RE: [musl] bug in getopt_long()
> From: <writeonce@...ipix.org>
> Date: Sat, January 07, 2017 8:13 am
> To: musl@...ts.openwall.com
>
>
> >
> >
> > -------- Original Message --------
> > Subject: [musl] bug in getopt_long()
> > From: "Anthony G. Basile" <basile@...eharbor.net>
> > Date: Thu, January 05, 2017 9:00 am
> > To: musl@...ts.openwall.com
> >
> > Hi,
> >
> > We hit a bug in Gentoo with getopt_long(). It appears the alpine people
> > hit it too http://bugs.alpinelinux.org/issues/4802. The problem was
> > encountered in open-iscsi but I got some reduced code which I've
> > attached. If you build and run that code as `./test --portal
> > 10.144.0.14 --discover` then you get
> >
> > p
> > D
> > unrecognized character 'D'
> >
> > On a glibc system, you don't get the "unrecognized character 'D'" which
> > is what we'd expect. Rich suggested a patch to musl which looked like
> > it might work, but it didn't. I didn't investigate further. I'm just
> > reporting it first to see if others know what's up.
> >
>
> The attached patch should work, I believe; tested with both of the
> following:
>
> ./a.out --portal 10.144.0.14 --discover
> ./a.out --portal 10.144.0.14 --discover -- foo bar
Behavior after my original patch deviated from glibc in the following
case:
./a.out -a -b -c -d -e --discover
The attached updated patch should do the trick for all three cases.
midipix
>
> midipix
>
>
> >
> > --
> > Anthony G. Basile, Ph.D.
> > Gentoo Linux Developer [Hardened]
> > E-Mail : basile@...eharbor.net
> > GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
> > GnuPG ID : F52D4BBA
> >
View attachment "getopt_long_v2.patch" of type "text/x-diff" (1275 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.