]> granicus.if.org Git - curl/commitdiff
nss: Don't ignore Curl_extract_certinfo() OOM failure
authorSteve Holme <steve_holme@hotmail.com>
Sat, 27 Dec 2014 20:57:33 +0000 (20:57 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 27 Dec 2014 22:18:08 +0000 (22:18 +0000)
lib/vtls/nss.c

index 309edbe621f3cb64107e95dda708b15126b998f8..d05b36d5f49b25166680c34d337d7347fa9dbe1d 100644 (file)
@@ -774,12 +774,17 @@ static CURLcode display_conn_info(struct connectdata *conn, PRFileDesc *sock)
       result = Curl_ssl_init_certinfo(conn->data, i);
       if(!result) {
         for(i = 0; cert; cert = cert2) {
-          Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data,
-            (char *)cert->derCert.data + cert->derCert.len);
+          result = Curl_extract_certinfo(conn, i++, (char *)cert->derCert.data,
+                                         (char *)cert->derCert.data +
+                                                 cert->derCert.len);
+          if(result)
+            break;
+
           if(cert->isRoot) {
             CERT_DestroyCertificate(cert);
             break;
           }
+
           cert2 = CERT_FindCertIssuer(cert, now, certUsageSSLCA);
           CERT_DestroyCertificate(cert);
         }