Solution proposal for issue #1647.

Avoid a memory alignment issue.

Signed-off-by: Matthias Kraft <Matthias.Kraft@softwareag.com>
CLA: trivial
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1650)
This commit is contained in:
Matthias Kraft 2016-09-30 10:50:17 +02:00 committed by Rich Salz
parent a22f9c84b4
commit af5883fec9

View File

@ -451,6 +451,7 @@ int main(int argc, char *argv[])
BIO *rbio;
BIO *wbio;
BIO *err;
time_t now = 0;
int testresult = 0;
int ret;
int i;
@ -464,7 +465,9 @@ int main(int argc, char *argv[])
RAND_bytes(master_secret, sizeof(master_secret));
RAND_bytes(cookie, sizeof(cookie));
RAND_bytes(server_random + 4, sizeof(server_random) - 4);
time((void *)server_random);
now = time(NULL);
memcpy(server_random, &now, sizeof(now));
sess = client_session();
if (sess == NULL) {