Skip to content

Commit

Permalink
* random/unix/sha2.c (apr__SHA256_Final, apr__SHA256_End): Fix parameter
Browse files Browse the repository at this point in the history
  buffer lengths to match declaration, avoiding GCC 11 warning.
  (no functional change)


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1889604 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed May 7, 2021
1 parent 0f08aad commit a788e59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions random/unix/sha2.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void apr__SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len)
usedspace = freespace = 0;
}

void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
void apr__SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) {
sha2_word32 *d = (sha2_word32*)digest;
unsigned int usedspace;

Expand Down Expand Up @@ -496,7 +496,7 @@ void apr__SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
usedspace = 0;
}

char *apr__SHA256_End(SHA256_CTX* context, char buffer[]) {
char *apr__SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest;
int i;

Expand Down

0 comments on commit a788e59

Please sign in to comment.