Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: net/cert/x509_util_mac.cc

Issue 2820183002: Mac: Fix crash in CreateSecCertificateArrayForX509Certificate. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_util_mac.cc
diff --git a/net/cert/x509_util_mac.cc b/net/cert/x509_util_mac.cc
index 0e12a64702a787bb7e754066a3b6d5aaa168da0b..c8f6a2f4a8e0110714e5932a68bacaecda9705c9 100644
--- a/net/cert/x509_util_mac.cc
+++ b/net/cert/x509_util_mac.cc
@@ -111,6 +111,8 @@ CreateSecCertificateArrayForX509Certificate(X509Certificate* cert) {
base::ScopedCFTypeRef<SecCertificateRef> sec_cert(
CreateSecCertificateFromBytes(CRYPTO_BUFFER_data(intermediate),
CRYPTO_BUFFER_len(intermediate)));
+ if (!sec_cert)
+ return base::ScopedCFTypeRef<CFMutableArrayRef>();
CFArrayAppendValue(cert_list, sec_cert);
}
#else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698