From f290652209468d989ae83a228d90fabd72b5329f Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Sat, 16 Nov 2013 15:16:13 +0100 Subject: [PATCH] used invalid sha size (64 bytes) with 32 malloc'd buffer --- libpcp/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpcp/key.c b/libpcp/key.c index af56616..55b33e3 100644 --- a/libpcp/key.c +++ b/libpcp/key.c @@ -268,7 +268,7 @@ pcp_key_t *pcp_derive_pcpkey (pcp_key_t *ours, char *theirs) { memcpy(both, ours->edsecret, 64); memcpy(&both[64], theirs, thlen); - if(crypto_hash(seed, both, inlen) != 0) { + if(crypto_hash_sha256(seed, both, inlen) != 0) { fatal("Failed to generate a hash of our pub key and recipient id!\n"); goto errdp1; }