http://sourceware.org/bugzilla/show_bug.cgi?id=12922
Only triggered by a program that uses "W;" in the short opt string
without providing a longopts array; that can be argued to be a
programmer error, so gnulib won't bother replacing glibc getopt if
it has that bug.
* lib/getopt.c (_getopt_internal_r): Avoid unlikely NULL
dereference.
Reported by Gustavo Martin Domato.
Signed-off-by: Eric Blake <eblake@redhat.com>
+2011-06-22 Eric Blake <eblake@redhat.com>
+
+ getopt: silence clang warning
+ * lib/getopt.c (_getopt_internal_r): Avoid unlikely NULL
+ dereference.
+ Reported by Gustavo Martin Domato.
+
2011-06-22 Jim Meyering <meyering@redhat.com>
bootstrap: do not insert a blank line into each .gitignore file
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;