]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/nseq.c
Fix coverity issues CID 1457745...1457752, 1457853, 1457854
[thirdparty/openssl.git] / apps / nseq.c
index 5b7ab67dd1ecbcfaafe951a6222a46fa65cc4ac4..9d1e0950e80d8cb4426d7e8135968490f4ea856d 100644 (file)
@@ -82,8 +82,10 @@ int nseq_main(int argc, char **argv)
         seq->certs = sk_X509_new_null();
         if (seq->certs == NULL)
             goto end;
-        while ((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL)))
-            sk_X509_push(seq->certs, x509);
+        while ((x509 = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
+            if (!sk_X509_push(seq->certs, x509))
+                goto end;
+        }
 
         if (!sk_X509_num(seq->certs)) {
             BIO_printf(bio_err, "%s: Error reading certs file %s\n",