getopt mistakenly allows '-;' as short option

This commit is contained in:
Eric Blake 2010-04-07 17:28:36 -07:00 committed by Ulrich Drepper
parent aa7f642769
commit cf0b68196c
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,10 @@
2009-12-02 Eric Blake <ebb9@byu.net>
2009-12-01 Eric Blake <ebb9@byu.net>
[BZ #11040]
* posix/getopt.c (_getopt_internal_r): Reject '-;' as short
option, since it conflicts with "W;" optstring extension.
2009-12-02 Eric Blake <ebb9@byu.net>
[BZ #11041]
* posix/getopt.c (_getopt_internal_r): Handle '-Wfoo' identically

View File

@ -789,7 +789,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
if (*d->__nextchar == '\0')
++d->optind;
if (temp == NULL || c == ':')
if (temp == NULL || c == ':' || c == ';')
{
if (print_errors)
{