diff options
author | Geoff Thorpe <geoff@openssl.org> | 2008-11-12 03:58:08 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2008-11-12 03:58:08 +0000 |
commit | 6343829a391df59e46e513c84b6264ee71ad9518 (patch) | |
tree | 9823103bf5828e47081ac906203516bdc332f577 /crypto/asn1/a_print.c | |
parent | 2401debe83e8df930907a39065ebf9a54354f123 (diff) | |
download | openssl-6343829a391df59e46e513c84b6264ee71ad9518.tar.gz |
Revert the size_t modifications from HEAD that had led to more
knock-on work than expected - they've been extracted into a patch
series that can be completed elsewhere, or in a different branch,
before merging back to HEAD.
Diffstat (limited to 'crypto/asn1/a_print.c')
-rw-r--r-- | crypto/asn1/a_print.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c index b3700b43fb..d18e772320 100644 --- a/crypto/asn1/a_print.c +++ b/crypto/asn1/a_print.c @@ -60,17 +60,16 @@ #include "cryptlib.h" #include <openssl/asn1.h> -int ASN1_PRINTABLE_type(const unsigned char *s, size_t len) +int ASN1_PRINTABLE_type(const unsigned char *s, int len) { int c; int ia5=0; int t61=0; - int ignore_len = 0; - if (len == 0) ignore_len = 1; + if (len <= 0) len= -1; if (s == NULL) return(V_ASN1_PRINTABLESTRING); - while (*s && !ignore_len && len-- != 0) + while ((*s) && (len-- != 0)) { c= *(s++); #ifndef CHARSET_EBCDIC |