diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-07 17:27:15 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-07 17:27:15 +0000 |
commit | a2cfdec3a1bfecda7ad4862563f61969598f3c47 (patch) | |
tree | 1adb5ae12cad7065e0c978baae6b7962c03bd874 /lib/libssl/t1_enc.c | |
parent | 0528e0ae5478c3c69ef9c415e847532e93a28e17 (diff) |
Add missing NULL check after calling EVP_PKEY_new_mac_key().
Based on Adam Langley's chromium patches.
Diffstat (limited to 'lib/libssl/t1_enc.c')
-rw-r--r-- | lib/libssl/t1_enc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index fba582d4ad8..59c0c487efe 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -487,6 +487,8 @@ tls1_change_cipher_state(SSL *s, int which) if (!(EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)) { mac_key = EVP_PKEY_new_mac_key(mac_type, NULL, mac_secret, mac_secret_size); + if (mac_key == NULL) + goto err; EVP_DigestSignInit(mac_ctx, NULL, mac, NULL, mac_key); EVP_PKEY_free(mac_key); } |