al = SSL_AD_DECODE_ERROR;
goto f_err;
}
- clienthello.session_id_len = session_id_len;
if (session_id_len > SSL_MAX_SSL_SESSION_ID_LENGTH) {
al = SSL_AD_DECODE_ERROR;
if (!PACKET_get_sub_packet(pkt, &clienthello.ciphersuites,
ciphersuite_len)
- || !PACKET_copy_bytes(pkt, clienthello.session_id,
- clienthello.session_id_len)
+ || !PACKET_copy_bytes(pkt, clienthello.session_id, session_id_len)
|| !PACKET_get_sub_packet(pkt, &challenge, challenge_len)
/* No extensions. */
|| PACKET_remaining(pkt) != 0) {
al = SSL_AD_DECODE_ERROR;
goto f_err;
}
+ clienthello.session_id_len = session_id_len;
/* Load the client random and compression list. */
challenge_len = challenge_len > sizeof(clienthello.random)