If we have a handshake fragment waiting then dtls1_read_bytes() was not
correctly setting the value of recvd_type, leading to an uninit read.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
2f2d6e3e3ccd1ae7bba9f1af62f97dfca986e083)
/*
* check whether there's a handshake message (client hello?) waiting
*/
- if ((ret = have_handshake_fragment(s, type, buf, len)))
+ if ((ret = have_handshake_fragment(s, type, buf, len))) {
+ *recvd_type = SSL3_RT_HANDSHAKE;
return ret;
+ }
/*
* Now s->rlayer.d->handshake_fragment_len == 0 if