From: Jim Meyering Date: Thu, 4 Jul 1996 04:22:25 +0000 (+0000) Subject: (split_3): Correct test for 35-byte line to accomodate X-Git-Tag: TEXTUTILS-1_18c~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4adeb812601f9e245bd5543889e1aba213768894;p=thirdparty%2Fcoreutils.git (split_3): Correct test for 35-byte line to accomodate fact that leading blanks may be stripped. --- diff --git a/src/md5sum.c b/src/md5sum.c index 31cd521555..f55ca34ce5 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -140,9 +140,9 @@ split_3 (char *s, size_t s_len, char **u, int *binary, char **w) while (ISWHITE (s[i])) ++i; - /* The line has to be at least 35 characters long to contain correct + /* The line must have at least 35 more characters to contain correct message digest information. */ - if (s_len >= 32 + 2 + 1) + if (s_len - i >= 32 + 2 + 1) { char *p; *u = &s[i];