used invalid sha size (64 bytes) with 32 malloc'd buffer

This commit is contained in:
TLINDEN
2013-11-16 15:16:13 +01:00
parent da55e17ff7
commit f290652209

View File

@@ -268,7 +268,7 @@ pcp_key_t *pcp_derive_pcpkey (pcp_key_t *ours, char *theirs) {
memcpy(both, ours->edsecret, 64); memcpy(both, ours->edsecret, 64);
memcpy(&both[64], theirs, thlen); 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"); fatal("Failed to generate a hash of our pub key and recipient id!\n");
goto errdp1; goto errdp1;
} }