Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type of length out parameter #397

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool hash_bytes(const uint8_t *in, size_t len, hash_t hash, uint8_t *out,
#ifndef _WIN32_BCRYPT

const EVP_MD *md;
uint32_t d_len = 0;
unsigned int d_len = 0;
bool ret = false;

md = get_hash(hash);
Expand All @@ -119,7 +119,7 @@ bool hash_bytes(const uint8_t *in, size_t len, hash_t hash, uint8_t *out,
ret = true;

hash_bytes_exit:
*out_len = (uint16_t) d_len;
*out_len = d_len;
EVP_MD_CTX_destroy(mdctx);
return ret;

Expand Down Expand Up @@ -368,7 +368,7 @@ bool hash_final(_hash_ctx *ctx, uint8_t *out, size_t *pcb_out) {
#ifdef _WIN32_BCRYPT
NTSTATUS status = 0;
#else
uint32_t d_len = 0;
unsigned int d_len = 0;
#endif

if (!ctx) {
Expand Down
Loading