FreeBSD Bugzilla – Attachment 164621 Details for
Bug 205598
[patch] sbin/md5.c param -c, convert to lowercase so E975548260B65C79AF... matches calculated e975548260b65c79af...
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
sbin/md5.c patch
sbin_md5.diff (text/plain), 1.60 KB, created by
Olli Hauer
on 2015-12-25 13:42:58 UTC
(
hide
)
Description:
sbin/md5.c patch
Filename:
MIME Type:
Creator:
Olli Hauer
Created:
2015-12-25 13:42:58 UTC
Size:
1.60 KB
patch
obsolete
>Index: head/sbin/md5/md5.c >=================================================================== >--- head/sbin/md5/md5.c (revision 292718) >+++ head/sbin/md5/md5.c (working copy) >@@ -34,6 +34,7 @@ > #include <string.h> > #include <time.h> > #include <unistd.h> >+#include <ctype.h> > > /* > * Length of test block, number of test blocks. >@@ -128,7 +129,7 @@ > main(int argc, char *argv[]) > { > int ch; >- char *p; >+ char *l, *p; > char buf[HEX_DIGEST_LENGTH]; > int failed; > unsigned digest; >@@ -153,6 +154,11 @@ > switch (ch) { > case 'c': > checkAgainst = optarg; >+ /* convert input to lower so >+ * E975548260B65C79AF... match calculated >+ * e975548260b65c79af... */ >+ for (l = checkAgainst; *l != '\0'; l++) >+ *l = (char) tolower(*l); > break; > case 'p': > MDFilter(&Algorithm[digest], 1); >Index: stable/10/sbin/md5/md5.c >=================================================================== >--- stable/10/sbin/md5/md5.c (revision 292718) >+++ stable/10/sbin/md5/md5.c (working copy) >@@ -34,6 +34,7 @@ > #include <string.h> > #include <time.h> > #include <unistd.h> >+#include <ctype.h> > > /* > * Length of test block, number of test blocks. >@@ -128,7 +129,7 @@ > main(int argc, char *argv[]) > { > int ch; >- char *p; >+ char *l, *p; > char buf[HEX_DIGEST_LENGTH]; > int failed; > unsigned digest; >@@ -153,6 +154,11 @@ > switch (ch) { > case 'c': > checkAgainst = optarg; >+ /* convert input to lower so >+ * E975548260B65C79AF... match calculated >+ * e975548260b65c79af... */ >+ for (l = checkAgainst; *l != '\0'; l++) >+ *l = (char) tolower(*l); > break; > case 'p': > MDFilter(&Algorithm[digest], 1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205598
: 164621