Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-03-28 16:59:10 +0300
committerDavid Benjamin <davidben@google.com>2016-03-28 20:17:32 +0300
commitb7c5e84847f6b92aee8d5825cd46d316db318a00 (patch)
tree0cce01a6ece4413375473ca40bdef8d0b6eb63c8 /crypto/x509
parente29ea166a6ec44bbfce81d1c93f064b9aca0f443 (diff)
Fix some malloc test failures.
These only affect the tests. Change-Id: If22d047dc98023501c771787b485276ece92d4a2 Reviewed-on: https://boringssl-review.googlesource.com/7573 Reviewed-by: Steven Valdez <svaldez@google.com> Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_test.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/x509/x509_test.cc b/crypto/x509/x509_test.cc
index 1fce6198..650163a8 100644
--- a/crypto/x509/x509_test.cc
+++ b/crypto/x509/x509_test.cc
@@ -243,6 +243,9 @@ static ScopedEVP_PKEY PrivateKeyFromPEM(const char *pem) {
// bumping the reference counts for each certificate in question.
static STACK_OF(X509)* CertsToStack(const std::vector<X509*> &certs) {
ScopedX509Stack stack(sk_X509_new_null());
+ if (!stack) {
+ return nullptr;
+ }
for (auto cert : certs) {
if (!sk_X509_push(stack.get(), cert)) {
return nullptr;