From: Ulrich Drepper Date: Mon, 8 Jun 1998 09:55:48 +0000 (+0000) Subject: (__fgetspent_r): Correct buffer overflow fix. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83a4b574315c2d19232df868db974b530679c86f;p=thirdparty%2Fglibc.git (__fgetspent_r): Correct buffer overflow fix. --- diff --git a/shadow/fgetspent_r.c b/shadow/fgetspent_r.c index fc9dedea24f..3c624448074 100644 --- a/shadow/fgetspent_r.c +++ b/shadow/fgetspent_r.c @@ -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;