Commit dad6ff265a for openssl.org
commit dad6ff265ab7923e7d59341507ef9db627a97008
Author: Bob Beck <beck@openssl.org>
Date: Tue Aug 11 12:26:43 2026 -0600
Use an int for the return value of i2a_ASN1_OBJECT
And as a result in this loop. I changed this to a size_t
which was needed where the variable was used later on and
missed this case at the start.
While harmless, coverity notices. so let's do it right
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Merge-date: Fri Aug 14 06:29:29 2026
Merged-from: https://github.com/openssl/openssl/pull/32310
diff --git a/apps/ca.c b/apps/ca.c
index a25661956b..ff7d1cdf79 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -2497,11 +2497,12 @@ static int old_entry_print(const ASN1_OBJECT *obj, const ASN1_STRING *str)
{
char buf[25], *pbuf;
const char *p;
+ int i;
size_t j;
- j = i2a_ASN1_OBJECT(bio_err, obj);
+ i = i2a_ASN1_OBJECT(bio_err, obj);
pbuf = buf;
- for (j = 22 - j; j > 0; j--)
+ for (i = 22 - i; i > 0; i--)
*(pbuf++) = ' ';
*(pbuf++) = ':';
*(pbuf++) = '\0';