Avoid out-of-bounds read
Avoid out-of-bounds read

Fixes CVE 2017-3735

Reviewed-by: Kurt Roeckx <bb87b47479d83cec3c76132206933257ded727b2@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4276)

openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl