diff --git a/libpcp/crypto.c b/libpcp/crypto.c index 044094c..1cbd7a7 100644 --- a/libpcp/crypto.c +++ b/libpcp/crypto.c @@ -171,7 +171,7 @@ size_t pcp_decrypt_file(FILE *in, FILE* out, pcp_key_t *s, unsigned char *symkey byte head[1]; size_t cur_bufsize, rec_size; - unsigned char rec_buf[PCP_ASYM_RECIPIENT_RSIZE]; + unsigned char rec_buf[PCP_ASYM_RECIPIENT_SIZE]; #ifdef PCP_ASYM_ADD_SENDER_PUB unsigned char *senderpub; @@ -224,27 +224,23 @@ size_t pcp_decrypt_file(FILE *in, FILE* out, pcp_key_t *s, unsigned char *symkey lenrec = be32toh(lenrec); if(verify) { - reccipher = ucmalloc(lenrec * PCP_ASYM_RECIPIENT_RSIZE); + reccipher = ucmalloc(lenrec * PCP_ASYM_RECIPIENT_SIZE); } /* step 4, fetch recipient list and try to decrypt it for us */ - unsigned char *recip = ucmalloc(PCP_ASYM_RECIPIENT_SIZE); for(nrec=0; nrec