Skip to content

Commit

Permalink
Merge pull request #744 from wazuh/binhash
Browse files Browse the repository at this point in the history
Nice one.
  • Loading branch information
Daniel B. Cid committed Feb 25, 2016
2 parents 6b6c1eb + 1644cbe commit de4d720
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/os_crypto/md5/md5_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int OS_MD5_File(const char *fname, os_md5 output)
memset(output, 0, 33);
buf[1024] = '\0';

fp = fopen(fname, "r");
fp = fopen(fname, "rb");
if (!fp) {
return (-1);
}
Expand Down Expand Up @@ -71,4 +71,3 @@ int OS_MD5_Str(const char *str, os_md5 output)

return (0);
}

3 changes: 1 addition & 2 deletions src/os_crypto/md5_sha1/md5_sha1_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int OS_MD5_SHA1_File(const char *fname, const char *prefilter_cmd, os_md5 md5out

/* Use prefilter_cmd if set */
if (prefilter_cmd == NULL) {
fp = fopen(fname, "r");
fp = fopen(fname, "rb");
if (!fp) {
return (-1);
}
Expand Down Expand Up @@ -86,4 +86,3 @@ int OS_MD5_SHA1_File(const char *fname, const char *prefilter_cmd, os_md5 md5out

return (0);
}

3 changes: 1 addition & 2 deletions src/os_crypto/sha1/sha1_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int OS_SHA1_File(const char *fname, os_sha1 output)
memset(output, 0, 65);
buf[2049] = '\0';

fp = fopen(fname, "r");
fp = fopen(fname, "rb");
if (!fp) {
return (-1);
}
Expand All @@ -58,4 +58,3 @@ int OS_SHA1_File(const char *fname, os_sha1 output)

return (0);
}

0 comments on commit de4d720

Please sign in to comment.