This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12922] getopt dumps core


http://sourceware.org/bugzilla/show_bug.cgi?id=12922

--- Comment #1 from Eric Blake <eblake at redhat dot com> 2011-06-22 17:13:20 UTC ---
Potential patch:

diff --git i/posix/getopt.c w/posix/getopt.c
index db89abf..da6ce66 100644
--- i/posix/getopt.c
+++ w/posix/getopt.c
@@ -869,7 +869,7 @@ _getopt_internal_r (int argc, char *const *argv, const char
*optstring,
     return '?';
       }
     /* Convenience. Treat POSIX -W foo same as long option --foo */
-    if (temp[0] == 'W' && temp[1] == ';')
+    if (temp[0] == 'W' && temp[1] == ';' && longopts)
       {
     char *nameend;
     const struct option *p;

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]