]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a possible memleak in smime_main
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 3 Dec 2023 10:34:37 +0000 (11:34 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 12 Dec 2023 18:47:07 +0000 (19:47 +0100)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22919)

apps/smime.c

index 88b0475d2d4fd03c242c09a544406934dca1a5ab..b59e14b0b5ed6fe57867d92d2752e8dacd3a6b4e 100644 (file)
@@ -484,7 +484,8 @@ int smime_main(int argc, char **argv)
                              "recipient certificate file");
             if (cert == NULL)
                 goto end;
-            sk_X509_push(encerts, cert);
+            if (!sk_X509_push(encerts, cert))
+                goto end;
             cert = NULL;
             argv++;
         }