From: Dr. Stephen Henson Date: Sat, 31 Mar 2012 18:02:23 +0000 (+0000) Subject: PR: 2778(part) X-Git-Tag: OpenSSL_0_9_8v~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0b1cf4a139b81727e19bb0c25775049ec787c444;p=oweals%2Fopenssl.git PR: 2778(part) Submitted by: John Fitzgibbon Time is always encoded as 4 bytes, not sizeof(Time). --- diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index f7bb18e703..2efaa19ddc 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -748,7 +748,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]);