Skip to content

Commit

Permalink
Bug 1622555 - Fix lowhashtest argument parsing. r=kjacobs
Browse files Browse the repository at this point in the history
--HG--
extra : amend_source : 6f104507d26a82efeda68768b1058b7c9568a87a
  • Loading branch information
hpjansson committed Mar 26, 2020
1 parent 93d33b9 commit ba6a9f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/lowhashtest/lowhashtest.c
Expand Up @@ -415,7 +415,7 @@ main(int argc, char **argv)
return 1;
}

if (argc || !argv[1] || strlen(argv[1]) == 0) {
if (argc < 2 || !argv[1] || strlen(argv[1]) == 0) {
rv += testMD5(initCtx);
rv += testSHA1(initCtx);
rv += testSHA224(initCtx);
Expand All @@ -428,7 +428,7 @@ main(int argc, char **argv)
rv += testSHA1(initCtx);
} else if (strcmp(argv[1], "SHA224") == 0) {
rv += testSHA224(initCtx);
} else if (strcmp(argv[1], "SHA226") == 0) {
} else if (strcmp(argv[1], "SHA256") == 0) {
rv += testSHA256(initCtx);
} else if (strcmp(argv[1], "SHA384") == 0) {
rv += testSHA384(initCtx);
Expand Down

0 comments on commit ba6a9f3

Please sign in to comment.