Skip to content

Commit

Permalink
Use correct output buffer size for EVP_MD
Browse files Browse the repository at this point in the history
`SHA256_DIGEST_LENGTH` is fine in the current implementation, but
it's safer to use the maximal size.
  • Loading branch information
flowerysong committed Oct 13, 2024
1 parent 06372fe commit edf2f39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libopenarc/arc-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct arc_hash
int hash_tmpfd;
BIO * hash_tmpbio;
EVP_MD_CTX * hash_ctx;
u_char hash_out[SHA256_DIGEST_LENGTH];
u_char hash_out[EVP_MAX_MD_SIZE];
int hash_outlen;
};

Expand Down

0 comments on commit edf2f39

Please sign in to comment.