2000-03-30  Ulrich Drepper  <drepper@redhat.com>

	* posix/getopt.c (_getopt_internal): Return -1 if argc < 1.
	Reported by Andrew Wiseman <a.wiseman@bandc.dircon.co.uk>
	(PR libc/1677).
This commit is contained in:
Ulrich Drepper 2000-03-31 05:03:53 +00:00
parent 7f4e0e5886
commit 05c54d4c8e
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2000-03-30 Ulrich Drepper <drepper@redhat.com>
* posix/getopt.c (_getopt_internal): Return -1 if argc < 1.
Reported by Andrew Wiseman <a.wiseman@bandc.dircon.co.uk>
(PR libc/1677).
2000-03-30 Andreas Jaeger <aj@suse.de>
* misc/sys/cdefs.h: Remove K&R support.

View File

@ -521,6 +521,9 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (optstring[0] == ':')
print_errors = 0;
if (argc < 1)
return -1;
optarg = NULL;
if (optind == 0 || !__getopt_initialized)