Skip to content

Commit

Permalink
Fix a cast
Browse files Browse the repository at this point in the history
The size_t is implementation-dependent data type, it shouldn't be
cast to unsigned int.
Fixes failing test probes/filehash58/test_probes_filehash58.sh
on s390x architecture.
  • Loading branch information
jan-cerny committed Aug 20, 2024
1 parent 8935e10 commit 106ffad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/OVAL/probes/crapi/digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ static int crapi_digest_update(struct crapi_digest_ctx *ctx, void *bptr, size_t
static int crapi_digest_fini(struct crapi_digest_ctx *ctx, crapi_alg_t alg)
{
#if defined(HAVE_NSS3)
HASH_End (ctx->ctx, ctx->dst, (unsigned int *)ctx->size, *ctx->size);
unsigned int result_len;
HASH_End(ctx->ctx, ctx->dst, &result_len, *ctx->size);
*ctx->size = result_len;
HASH_Destroy (ctx->ctx);
#elif defined(HAVE_GCRYPT)
void *buffer;
Expand Down

0 comments on commit 106ffad

Please sign in to comment.