diff options
author | Eric Blake <ebb9@byu.net> | 2010-04-07 17:28:36 -0700 |
---|---|---|
committer | Petr Baudis <pasky@ucw.cz> | 2010-05-12 03:21:15 +0200 |
commit | d75c76e1d74d3c6fe508738abd442aae0365d690 (patch) | |
tree | fb27ebff70ecc0905c3bf1c1c2a3706db2f54fb4 | |
parent | 443a33d8042f4084d4d1f40a5b973a19bcae9a23 (diff) |
getopt mistakenly allows '-;' as short option
(cherry picked from commit cf0b68196c837ad591f0e7fc0f8e8a0f690b847c)
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | posix/getopt.c | 2 |
2 files changed, 8 insertions, 2 deletions
@@ -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 diff --git a/posix/getopt.c b/posix/getopt.c index 01c1071ecb..b778047cd9 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -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) { |