]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Don't return a value we never check from indent_printf()
authorBob Beck <beck@openssl.org>
Mon, 15 Sep 2025 17:52:44 +0000 (11:52 -0600)
committerPauli <paul.dale@oracle.com>
Wed, 17 Sep 2025 22:15:59 +0000 (08:15 +1000)
Coverity notices it could overflow, since we don't use this
don't bother returning it

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28553)

apps/storeutl.c

index f8ebde44481c1f994f6ffa6223ce24f8e2e13139..bb489d6d9bd16b0df1ceed3912cc76c33b293942 100644 (file)
@@ -328,25 +328,14 @@ int storeutl_main(int argc, char *argv[])
     return ret;
 }
 
-static int indent_printf(int indent, BIO *bio, const char *format, ...)
+static void indent_printf(int indent, BIO *bio, const char *format, ...)
 {
     va_list args;
-    int ret, vret;
-
-    ret = BIO_printf(bio, "%*s", indent, "");
-    if (ret < 0)
-        return ret;
 
+    BIO_printf(bio, "%*s", indent, "");
     va_start(args, format);
-    vret = BIO_vprintf(bio, format, args);
+    BIO_vprintf(bio, format, args);
     va_end(args);
-
-    if (vret < 0)
-        return vret;
-    if (vret > INT_MAX - ret)
-        return INT_MAX;
-
-    return ret + vret;
 }
 
 static int process(const char *uri, const UI_METHOD *uimeth, PW_CB_DATA *uidata,