Fix crash in tls13_enc
authorMatt Caswell <matt@openssl.org>
Wed, 8 Feb 2017 09:33:44 +0000 (09:33 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 8 Feb 2017 11:41:45 +0000 (11:41 +0000)
commit18b3a80a5fd368f59c322fbb16b7dc92c1f11efa
tree93b9883fc6928ff1ae5eb90ec5eebda3bdc6f339
parent21d94d44246bfe2c220bc3b219443ccaedce308d
Fix crash in tls13_enc

If s->s3->tmp.new_cipher is NULL then a crash can occur. This can happen
if an alert gets sent after version negotiation (i.e. we have selected
TLSv1.3 and ended up in tls13_enc), but before a ciphersuite has been
selected.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2575)
ssl/record/ssl3_record_tls13.c
test/tls13encryptiontest.c