From: Tomas Mraz Date: Wed, 22 Jan 2025 16:40:44 +0000 (+0100) Subject: template_kem.c: Use proper printf format for size_t X-Git-Tag: openssl-3.5.0-alpha1~688 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bdb4a67bdab74bc1629eb2ab7f8704f6ba221b3;p=thirdparty%2Fopenssl.git template_kem.c: Use proper printf format for size_t Fixes Coverity 1633351, 1633352, 1633354, 1633355 Reviewed-by: Dmitry Belyavskiy Reviewed-by: Neil Horman Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/26522) --- diff --git a/providers/implementations/kem/template_kem.c b/providers/implementations/kem/template_kem.c index e504d8709f6..c06cb88f205 100644 --- a/providers/implementations/kem/template_kem.c +++ b/providers/implementations/kem/template_kem.c @@ -144,7 +144,7 @@ static int template_encapsulate(void *vctx, unsigned char *out, size_t *outlen, if (out == NULL) { if (outlen != NULL && secretlen != NULL) - debug_print("encaps outlens set to %d and %d\n", *outlen, *secretlen); + debug_print("encaps outlens set to %zu and %zu\n", *outlen, *secretlen); return 1; } @@ -157,7 +157,7 @@ static int template_encapsulate(void *vctx, unsigned char *out, size_t *outlen, static int template_decapsulate(void *vctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen) { - debug_print("decaps %p to %p inlen at %d\n", vctx, out, inlen); + debug_print("decaps %p to %p inlen at %zu\n", vctx, out, inlen); /* add algorithm-specific length checks */ @@ -166,7 +166,7 @@ static int template_decapsulate(void *vctx, unsigned char *out, size_t *outlen, if (out == NULL) { if (outlen != NULL) - debug_print("decaps outlen set to %d \n", *outlen); + debug_print("decaps outlen set to %zu \n", *outlen); return 1; }