X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Ff_int.c;h=55560dd814ade9dec8fd21e26e3d3cc710f55241;hp=4d6c9b22783b3c50289479a664fa947d7a1bc37a;hb=f66c3032015e13071069be276edb50dc79d5f2a4;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c index 4d6c9b2278..55560dd814 100644 --- a/crypto/asn1/f_int.c +++ b/crypto/asn1/f_int.c @@ -59,7 +59,7 @@ #include #include "cryptlib.h" #include -#include +#include int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a) { @@ -117,9 +117,18 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) for (j=0; 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;