Fix S390X bad size_t that causes memory trash in legacy ciphers
authorShane Lontis <shane.lontis@oracle.com>
Fri, 13 Sep 2019 23:11:28 +0000 (09:11 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Fri, 13 Sep 2019 23:11:28 +0000 (09:11 +1000)
commit88d870824f1f913877f0f978ae60879575daf56d
treebb9ff1ff79206a613848c95418632641ef6d4ff8
parentb4570683608a9a349aae20bfa13270cd2b5bee1d
Fix S390X bad size_t that causes memory trash in legacy ciphers

This caused a SEGV inside tls13_enc() when using chacha_poly.
The tls code assigns the iv_length to a size_t (even though it is an int).
This is actually really bad since it could be -1, which will then trash the iv buffer.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/9890)
crypto/evp/evp_lib.c