diff options
Diffstat (limited to 'crypto/asn1/f_int.c')
-rw-r--r-- | crypto/asn1/f_int.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c index 4d6c9b2..d81c50d 100644 --- a/crypto/asn1/f_int.c +++ b/crypto/asn1/f_int.c @@ -117,9 +117,18 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) for (j=0; j<i; j++) { +#ifndef CHARSET_EBCDIC if (!( ((buf[j] >= '0') && (buf[j] <= '9')) || ((buf[j] >= 'a') && (buf[j] <= 'f')) || ((buf[j] >= 'A') && (buf[j] <= 'F')))) +#else + /* This #ifdef is not strictly necessary, since + * the characters A...F a...f 0...9 are contiguous + * (yes, even in EBCDIC - but not the whole alphabet). + * Nevertheless, isxdigit() is faster. + */ + if (!isxdigit(buf[j])) +#endif { i=j; break; |