提交 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[]) ...@@ -451,6 +451,7 @@ int main(int argc, char *argv[])
BIO *rbio; BIO *rbio;
BIO *wbio; BIO *wbio;
BIO *err; BIO *err;
time_t now = 0;
int testresult = 0; int testresult = 0;
int ret; int ret;
int i; int i;
...@@ -464,7 +465,9 @@ int main(int argc, char *argv[]) ...@@ -464,7 +465,9 @@ int main(int argc, char *argv[])
RAND_bytes(master_secret, sizeof(master_secret)); RAND_bytes(master_secret, sizeof(master_secret));
RAND_bytes(cookie, sizeof(cookie)); RAND_bytes(cookie, sizeof(cookie));
RAND_bytes(server_random + 4, sizeof(server_random) - 4); 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(); sess = client_session();
if (sess == NULL) { if (sess == NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册