Always ensure that init_msg is initialised for a CCS
[openssl.git] / ssl / statem / statem_lib.c
index 990510a06bde6c73391966ba5e425fe7e2da2e29..24159da3e7e3e5105e3415a5f2a2ef9877201626 100644 (file)
@@ -391,6 +391,7 @@ int tls_get_message_header(SSL *s, int *mt)
                 }
                 s->s3->tmp.message_type = *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
                 s->init_num = readbytes - 1;
+                s->init_msg = s->init_buf->data;
                 s->s3->tmp.message_size = readbytes;
                 return 1;
             } else if (recvd_type != SSL3_RT_HANDSHAKE) {