summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_asn1.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-08-02 11:48:15 +0000
committerBodo Möller <bodo@openssl.org>2002-08-02 11:48:15 +0000
commit5574e0ed417c9a09487a270fec3df34d3094f5c6 (patch)
treeae3a9a39081ea1b5a01482dd15f6f8b259fa93e9 /ssl/ssl_asn1.c
parent042e57d5628244b121836881c433b6fa2b6f1697 (diff)
get rid of OpenSSLDie
Diffstat (limited to 'ssl/ssl_asn1.c')
-rw-r--r--ssl/ssl_asn1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c
index 1638c6b525..3723fc2e37 100644
--- a/ssl/ssl_asn1.c
+++ b/ssl/ssl_asn1.c
@@ -294,10 +294,11 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp,
i=SSL2_MAX_SSL_SESSION_ID_LENGTH;
if (os.length > i)
- os.length=i;
+ os.length = i;
+ if (os.length > sizeof ret->session_id) /* can't happen */
+ os.length = sizeof ret->session_id;
ret->session_id_length=os.length;
- die(os.length <= sizeof ret->session_id);
memcpy(ret->session_id,os.data,os.length);
M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);