Fix a compression bug
authorMatt Caswell <matt@openssl.org>
Wed, 1 Mar 2017 11:20:30 +0000 (11:20 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 2 Mar 2017 16:49:28 +0000 (16:49 +0000)
commitf33f9ddefbb34584acb73c51e286f9913af96534
tree5c2129d8bf5ef468e277f6a8903fcdc3d89b1fb6
parentc19602b543562104b756aa6adec9bd5081207574
Fix a compression bug

do_ssl3_write() was crashing when compression was enabled. We calculate
the maximum length that a record will be after compression and reserve
those bytes in the WPACKET. Unfortunately we were adding the maximum
compression overhead onto the wrong variable resulting in a corrupted
record.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2814)
ssl/record/rec_layer_s3.c