Author: eadler Date: Wed May 23 11:45:46 2018 New Revision: 334091 URL: https://svnweb.freebsd.org/changeset/base/334091
Log: md5: perform compare case-insenstive md5 generates a md5 hash lowercase, but it might be provided in uppercase. Allow this. PR: 205598 Reported by: ohauer MFC After: 2 weeks Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Wed May 23 11:20:16 2018 (r334090) +++ head/sbin/md5/md5.c Wed May 23 11:45:46 2018 (r334091) @@ -243,7 +243,7 @@ main(int argc, char *argv[]) else printf("%s (%s) = %s", Algorithm[digest].name, *argv, p); - if (checkAgainst && strcmp(checkAgainst,p)) + if (checkAgainst && strcasecmp(checkAgainst, p) != 0) { checksFailed++; if (!qflag) @@ -282,7 +282,7 @@ MDString(const Algorithm_t *alg, const char *string) printf("%s \"%s\"", buf, string); else printf("%s (\"%s\") = %s", alg->name, string, buf); - if (checkAgainst && strcmp(buf,checkAgainst)) + if (checkAgainst && strcasecmp(buf,checkAgainst) != 0) { checksFailed++; if (!qflag) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"