]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
template_kem.c: Use proper printf format for size_t
authorTomas Mraz <tomas@openssl.org>
Wed, 22 Jan 2025 16:40:44 +0000 (17:40 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 24 Jan 2025 13:16:44 +0000 (14:16 +0100)
Fixes Coverity 1633351163335216333541633355

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26522)

providers/implementations/kem/template_kem.c

index e504d8709f67f800d2d8d1040d0f11b072fd656d..c06cb88f2057cf9586f74d25bc77eb018629a27f 100644 (file)
@@ -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;
     }