* libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access.

This commit is contained in:
Corinna Vinschen 2013-11-12 11:30:32 +00:00
parent 4146cc5ce7
commit f1359420da
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2013-11-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access.
2013-11-08 Terry Guo <terry.guo@arm.com>
* libm/libm.texinfo: Rename node Index to Document Index.

View File

@ -269,6 +269,10 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
break;
}
}
/* End of option list? */
if (argv[data->optind] == 0)
return EOF;
/* we've got an option, so parse it */
/* first, is it a long option? */