aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_print.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2008-11-01 16:40:37 +0000
committerBen Laurie <ben@openssl.org>2008-11-01 16:40:37 +0000
commit5e4430e70df0020f5f1517249851696cb9ac4ad2 (patch)
tree95dcbc73bcd99b725664324db882b4a388d0d4cb /crypto/asn1/a_print.c
parent4d6e1e4f29de455b5e644ea9cae5d5f5a2dbef33 (diff)
downloadopenssl-5e4430e70df0020f5f1517249851696cb9ac4ad2.tar.gz
More size_tification.
Diffstat (limited to 'crypto/asn1/a_print.c')
-rw-r--r--crypto/asn1/a_print.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c
index 4a20dca85c..b3700b43fb 100644
--- a/crypto/asn1/a_print.c
+++ b/crypto/asn1/a_print.c
@@ -65,11 +65,12 @@ int ASN1_PRINTABLE_type(const unsigned char *s, size_t len)
int c;
int ia5=0;
int t61=0;
+ int ignore_len = 0;
- if (len <= 0) len= -1;
+ if (len == 0) ignore_len = 1;
if (s == NULL) return(V_ASN1_PRINTABLESTRING);
- while ((*s) && (len-- != 0))
+ while (*s && !ignore_len && len-- != 0)
{
c= *(s++);
#ifndef CHARSET_EBCDIC