提交 af5883fe 编写于 作者: M Matthias Kraft 提交者: Rich Salz

Solution proposal for issue #1647.

Avoid a memory alignment issue.
Signed-off-by: NMatthias Kraft <Matthias.Kraft@softwareag.com>
CLA: trivial
Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1650)
上级 a22f9c84
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册