]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 31 Mar 2000 05:03:53 +0000 (05:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 31 Mar 2000 05:03:53 +0000 (05:03 +0000)
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).

ChangeLog
posix/getopt.c

index 852063339325f283c11af2e88e46a864eed01db9..60bb8e10a0487370aa6c7fed15790d0195f06e23 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 4744e43390ac66c9d46ad35d38460627906c78be..f1add57292895870aa21864a018edba37652c9d6 100644 (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)
This page took 0.042456 seconds and 5 git commands to generate.