diff options
author | David Benjamin <davidben@chromium.org> | 2015-05-16 02:11:57 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-21 21:00:10 +0300 |
commit | 3fa65f0f05f67615d9daf48940e07f84d094ac6e (patch) | |
tree | 9c4c6b56547b20c13098624e4442f1fad6941ffd /crypto/ec/ec_test.cc | |
parent | 0b635c52b241af78b69addecbb84c7d55f3cabb4 (diff) |
Fix some malloc test crashs.
This isn't exhaustive. There are still failures in some tests which probably
ought to get C++'d first.
Change-Id: Iac58df9d98cdfd94603d54374a531b2559df64c3
Reviewed-on: https://boringssl-review.googlesource.com/4795
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec/ec_test.cc')
-rw-r--r-- | crypto/ec/ec_test.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/ec/ec_test.cc b/crypto/ec/ec_test.cc index 74685eb5..5af42d5f 100644 --- a/crypto/ec/ec_test.cc +++ b/crypto/ec/ec_test.cc @@ -125,6 +125,9 @@ bool Testd2i_ECPrivateKey() { } ScopedOpenSSLString x_hex(BN_bn2hex(x.get())); ScopedOpenSSLString y_hex(BN_bn2hex(y.get())); + if (!x_hex || !y_hex) { + return false; + } if (0 != strcmp( x_hex.get(), "c81561ecf2e54edefe6617db1c7a34a70744ddb261f269b83dacfcd2ade5a681") || |