aboutsummaryrefslogtreecommitdiff
path: root/src/common/md5_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/md5_common.c')
-rw-r--r--src/common/md5_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/md5_common.c b/src/common/md5_common.c
index b01c95ebb6e..2114890effe 100644
--- a/src/common/md5_common.c
+++ b/src/common/md5_common.c
@@ -78,7 +78,7 @@ pg_md5_hash(const void *buff, size_t len, char *hexsum)
if (pg_cryptohash_init(ctx) < 0 ||
pg_cryptohash_update(ctx, buff, len) < 0 ||
- pg_cryptohash_final(ctx, sum) < 0)
+ pg_cryptohash_final(ctx, sum, sizeof(sum)) < 0)
{
pg_cryptohash_free(ctx);
return false;
@@ -100,7 +100,7 @@ pg_md5_binary(const void *buff, size_t len, void *outbuf)
if (pg_cryptohash_init(ctx) < 0 ||
pg_cryptohash_update(ctx, buff, len) < 0 ||
- pg_cryptohash_final(ctx, outbuf) < 0)
+ pg_cryptohash_final(ctx, outbuf, MD5_DIGEST_LENGTH) < 0)
{
pg_cryptohash_free(ctx);
return false;