Skip to content
Snippets Groups Projects
Commit 061ac9ae authored by Matthias Dressel's avatar Matthias Dressel
Browse files

cli: Fix md5 verification for short values

Verification should not succeed if the given string is too short to be a
real hash.

Fixes videolan/dav1d#361
parent 93319cef
No related branches found
No related tags found
1 merge request!1153cli: Fix md5 verification for short values
Pipeline #65566 passed with stages
in 7 minutes and 28 seconds
...@@ -283,7 +283,7 @@ static int md5_verify(MD5Context *const md5, const char *md5_str) { ...@@ -283,7 +283,7 @@ static int md5_verify(MD5Context *const md5, const char *md5_str) {
md5_finish(md5); md5_finish(md5);
if (strlen(md5_str) < 32) if (strlen(md5_str) < 32)
return 0; return -1;
uint32_t abcd[4] = { 0 }; uint32_t abcd[4] = { 0 };
char t[3] = { 0 }; char t[3] = { 0 };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment