Fix a printf format error in cmp_client.c
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Wed, 1 Apr 2020 04:00:27 +0000 (06:00 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 2 Apr 2020 07:19:25 +0000 (09:19 +0200)
The value is of type uint64 but the format
%ld is not suitable for that, need to use %jd.

[extended tests]

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11454)

crypto/cmp/cmp_client.c

index 394358c5e30d47d85f9ac4e4d743517cb92fa39c..eedabc59d29ff8e05e8d2e67fb7a7c453606ba48 100644 (file)
@@ -284,7 +284,7 @@ static int poll_for_response(OSSL_CMP_CTX *ctx, int sleep, int rid,
             if (check_after < 0 || (uint64_t)check_after
                 > (sleep ? ULONG_MAX / 1000 : INT_MAX)) {
                 CMPerr(0, CMP_R_CHECKAFTER_OUT_OF_RANGE);
-                if (BIO_snprintf(str, OSSL_CMP_PKISI_BUFLEN, "value = %ld",
+                if (BIO_snprintf(str, OSSL_CMP_PKISI_BUFLEN, "value = %jd",
                                  check_after) >= 0)
                     ERR_add_error_data(1, str);
                 goto err;