Date: Sat, 9 Jun 2018 03:01:39 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334870 - stable/11/sbin/md5 Message-ID: <201806090301.w5931doS081593@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Sat Jun 9 03:01:38 2018 New Revision: 334870 URL: https://svnweb.freebsd.org/changeset/base/334870 Log: MFC r334091: 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: stable/11/sbin/md5/md5.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/md5/md5.c ============================================================================== --- stable/11/sbin/md5/md5.c Sat Jun 9 02:47:02 2018 (r334869) +++ stable/11/sbin/md5/md5.c Sat Jun 9 03:01:38 2018 (r334870) @@ -220,7 +220,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) @@ -255,7 +255,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806090301.w5931doS081593>