summaryrefslogtreecommitdiffstats
path: root/ssl/s3_pkt.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2010-03-25 11:22:42 +0000
committerBodo Möller <bodo@openssl.org>2010-03-25 11:22:42 +0000
commit5b5464d525fa854244763390448e7232b72a4d8d (patch)
tree3c03c760e5fe07a6c5658283e2d909da00d7e723 /ssl/s3_pkt.c
parentcd15a0528f806808365ea834b63588f16a84f8dc (diff)
Fix for "Record of death" vulnerability CVE-2010-0740.
Also, add missing CHANGES entry for CVE-2009-3245 (code changes submitted to this branch on 23 Feb 2010).
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r--ssl/s3_pkt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 32a8b55112..e3f6050a26 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -336,9 +336,9 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length);
if (version != s->version)
{
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER);
- /* Send back error using their
- * version number :-) */
- s->version=version;
+ if ((s->version & 0xFF00) == (version & 0xFF00))
+ /* Send back error using their minor version number :-) */
+ s->version = (unsigned short)version;
al=SSL_AD_PROTOCOL_VERSION;
goto f_err;
}