mirror of https://github.com/xfarrow/dircomp.git
Bugfix SHA-1 hash comparison
This commit is contained in:
parent
fee4b98d9f
commit
6c8dbaa976
|
@ -325,7 +325,7 @@ int hash_by_hash_file_comparison(char* filename1, char* filename2)
|
|||
{
|
||||
char* hash1 = sha1(filename1);
|
||||
char* hash2 = sha1(filename2);
|
||||
int ret = (strcmp(hash1, hash2) == 0);
|
||||
int ret = (memcmp(hash1, hash2, SHA_DIGEST_LENGTH) == 0);
|
||||
free(hash1);
|
||||
free(hash2);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue