]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__fgetspent_r): Correct buffer overflow fix.
authorUlrich Drepper <drepper@redhat.com>
Mon, 8 Jun 1998 09:55:48 +0000 (09:55 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 8 Jun 1998 09:55:48 +0000 (09:55 +0000)
shadow/fgetspent_r.c

index fc9dedea24f79a90967ee5ca0c195a60761388bb..3c6244480741d820d9a517d28966f4f805381b91 100644 (file)
@@ -47,7 +47,7 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen,
          *result = NULL;
          return errno;
        }
-      if (p == NULL || buffer[buflen] != '\xff')
+      if (p == NULL || buffer[buflen - 1] != '\xff')
        {
          *result = NULL;
          return errno = ERANGE;