e9212cd315
Resolves: RHEL-53981
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From 106ffad93e3145747b9d6ea2a4872ed1bdc5f595 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
Date: Tue, 20 Aug 2024 08:18:15 +0200
|
|
Subject: [PATCH] Fix a cast
|
|
|
|
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.
|
|
---
|
|
src/OVAL/probes/crapi/digest.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/OVAL/probes/crapi/digest.c b/src/OVAL/probes/crapi/digest.c
|
|
index 96f638d4a..2fc1c6998 100644
|
|
--- a/src/OVAL/probes/crapi/digest.c
|
|
+++ b/src/OVAL/probes/crapi/digest.c
|
|
@@ -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;
|
|
--
|
|
2.46.0
|
|
|