summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2008-09-14 13:42:34 +0000
committerBodo Möller <bodo@openssl.org>2008-09-14 13:42:34 +0000
commitf8d6be3f8170c4aa3bea1618994f912629f3d0c3 (patch)
tree18c4c5d270339284cc408289fff7cbf6994b6163 /ssl
parentd493899579429374026bc11c60859d5af9c2a0dc (diff)
Some precautions to avoid potential security-relevant problems.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_asn1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c
index 8630d3ecee..8c4840219b 100644
--- a/ssl/ssl_asn1.c
+++ b/ssl/ssl_asn1.c
@@ -413,7 +413,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
memcpy(ret->session_id,os.data,os.length);
M_ASN1_D2I_get_x(ASN1_OCTET_STRING,osp,d2i_ASN1_OCTET_STRING);
- if (ret->master_key_length > SSL_MAX_MASTER_KEY_LENGTH)
+ if (os.length > SSL_MAX_MASTER_KEY_LENGTH)
ret->master_key_length=SSL_MAX_MASTER_KEY_LENGTH;
else
ret->master_key_length=os.length;