commit | 3fa65f0f05f67615d9daf48940e07f84d094ac6e | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@chromium.org> | Fri May 15 19:11:57 2015 -0400 |
committer | Adam Langley <agl@google.com> | Thu May 21 18:00:10 2015 +0000 |
tree | 9c4c6b56547b20c13098624e4442f1fad6941ffd | |
parent | 0b635c52b241af78b69addecbb84c7d55f3cabb4 [diff] [blame] |
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>
diff --git a/crypto/modes/gcm_test.c b/crypto/modes/gcm_test.c index 3548c81..a8819ea 100644 --- a/crypto/modes/gcm_test.c +++ b/crypto/modes/gcm_test.c
@@ -347,6 +347,9 @@ } 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;