diff options
author | simon <simon@FreeBSD.org> | 2010-11-22 18:23:44 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2010-11-22 18:23:44 +0000 |
commit | 7a23485c98b888d229c5e0762dbcfcec293fcef6 (patch) | |
tree | 5691801dabb6a06320a55f5ce8ed927af41514f3 /crypto/openssl/ssl/d1_lib.c | |
parent | 9c043d590896a77d5d66b978a963573a41d66ad3 (diff) | |
download | FreeBSD-src-7a23485c98b888d229c5e0762dbcfcec293fcef6.zip FreeBSD-src-7a23485c98b888d229c5e0762dbcfcec293fcef6.tar.gz |
Merge OpenSSL 0.9.8p into head.
Security: CVE-2010-3864
Security: http://www.openssl.org/news/secadv_20101116.txt
Diffstat (limited to 'crypto/openssl/ssl/d1_lib.c')
-rw-r--r-- | crypto/openssl/ssl/d1_lib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/openssl/ssl/d1_lib.c b/crypto/openssl/ssl/d1_lib.c index 63bfbac..54e1640 100644 --- a/crypto/openssl/ssl/d1_lib.c +++ b/crypto/openssl/ssl/d1_lib.c @@ -305,6 +305,16 @@ struct timeval* dtls1_get_timeout(SSL *s, struct timeval* timeleft) timeleft->tv_usec += 1000000; } + /* If remaining time is less than 15 ms, set it to 0 + * to prevent issues because of small devergences with + * socket timeouts. + */ + if (timeleft->tv_sec == 0 && timeleft->tv_usec < 15000) + { + memset(timeleft, 0, sizeof(struct timeval)); + } + + return timeleft; } |