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@chromium.org>2015-05-16 02:11:57 +0300
committerAdam Langley <agl@google.com>2015-05-21 21:00:10 +0300
commit3fa65f0f05f67615d9daf48940e07f84d094ac6e (patch)
tree9c4c6b56547b20c13098624e4442f1fad6941ffd /crypto/modes
parent0b635c52b241af78b69addecbb84c7d55f3cabb4 (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/modes')
-rw-r--r--crypto/modes/gcm_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/modes/gcm_test.c b/crypto/modes/gcm_test.c
index 3548c81b..a8819ea4 100644
--- a/crypto/modes/gcm_test.c
+++ b/crypto/modes/gcm_test.c
@@ -347,6 +347,9 @@ static int run_test_case(unsigned test_num, const struct test_case *test) {
}
out = OPENSSL_malloc(plaintext_len);
+ if (out == NULL) {
+ goto out;
+ }
if (AES_set_encrypt_key(key, key_len*8, &aes_key)) {
fprintf(stderr, "%u: AES_set_encrypt_key failed.\n", test_num);
goto out;