From 5e2187f7ee7525213485a0608a9dbe9ce41cf34f Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 31 Mar 2012 18:02:53 +0000 Subject: [PATCH] PR: 2778(part) Submitted by: John Fitzgibbon Time is always encoded as 4 bytes, not sizeof(Time). --- ssl/d1_srvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 5822379d10..29421da9aa 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -920,7 +920,7 @@ int dtls1_send_server_hello(SSL *s) p=s->s3->server_random; Time=(unsigned long)time(NULL); /* Time */ l2n(Time,p); - RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time)); + RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4); /* Do the message type and length last */ d=p= &(buf[DTLS1_HM_HEADER_LENGTH]); -- 2.25.1