Loading apps/s_client.c +4 −7 Original line number Diff line number Diff line Loading @@ -518,19 +518,16 @@ static ossl_ssize_t hexdecode(const char **inptr, void *result) return -1; for (byte = 0; *in; ++in) { char c; int x; if (isspace(_UC(*in))) continue; c = tolower(_UC(*in)); if ('0' <= c && c <= '9') { byte |= c - '0'; } else if ('a' <= c && c <= 'f') { byte |= c - 'a' + 10; } else { x = OPENSSL_hexchar2int(*in); if (x < 0) { OPENSSL_free(ret); return 0; } byte |= (char)x; if ((nibble ^= 1) == 0) { *cp++ = byte; byte = 0; Loading crypto/asn1/f_int.c +2 −8 Original line number Diff line number Diff line Loading @@ -175,14 +175,8 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) } for (j = 0; j < i; j++, k += 2) { for (n = 0; n < 2; n++) { m = bufp[k + n]; if ((m >= '0') && (m <= '9')) m -= '0'; else if ((m >= 'a') && (m <= 'f')) m = m - 'a' + 10; else if ((m >= 'A') && (m <= 'F')) m = m - 'A' + 10; else { m = OPENSSL_hexchar2int(bufp[k + n]); if (m < 0) { ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_NON_HEX_CHARACTERS); goto err; Loading crypto/asn1/f_string.c +2 −8 Original line number Diff line number Diff line Loading @@ -167,14 +167,8 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) } for (j = 0; j < i; j++, k += 2) { for (n = 0; n < 2; n++) { m = bufp[k + n]; if ((m >= '0') && (m <= '9')) m -= '0'; else if ((m >= 'a') && (m <= 'f')) m = m - 'a' + 10; else if ((m >= 'A') && (m <= 'F')) m = m - 'A' + 10; else { m = OPENSSL_hexchar2int(bufp[k + n]); if (m < 0) { ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_NON_HEX_CHARACTERS); return 0; Loading crypto/bn/bn_print.c +2 −7 Original line number Diff line number Diff line Loading @@ -215,13 +215,8 @@ int BN_hex2bn(BIGNUM **bn, const char *a) l = 0; for (;;) { c = a[j - m]; if ((c >= '0') && (c <= '9')) k = c - '0'; else if ((c >= 'a') && (c <= 'f')) k = c - 'a' + 10; else if ((c >= 'A') && (c <= 'F')) k = c - 'A' + 10; else k = OPENSSL_hexchar2int(c); if (k < 0) k = 0; /* paranoia */ l = (l << 4) | k; Loading crypto/pem/pem_lib.c +2 −7 Original line number Diff line number Diff line Loading @@ -558,13 +558,8 @@ static int load_iv(char **fromp, unsigned char *to, int num) to[i] = 0; num *= 2; for (i = 0; i < num; i++) { if ((*from >= '0') && (*from <= '9')) v = *from - '0'; else if ((*from >= 'A') && (*from <= 'F')) v = *from - 'A' + 10; else if ((*from >= 'a') && (*from <= 'f')) v = *from - 'a' + 10; else { v = OPENSSL_hexchar2int(*from); if (v < 0) { PEMerr(PEM_F_LOAD_IV, PEM_R_BAD_IV_CHARS); return (0); } Loading Loading
apps/s_client.c +4 −7 Original line number Diff line number Diff line Loading @@ -518,19 +518,16 @@ static ossl_ssize_t hexdecode(const char **inptr, void *result) return -1; for (byte = 0; *in; ++in) { char c; int x; if (isspace(_UC(*in))) continue; c = tolower(_UC(*in)); if ('0' <= c && c <= '9') { byte |= c - '0'; } else if ('a' <= c && c <= 'f') { byte |= c - 'a' + 10; } else { x = OPENSSL_hexchar2int(*in); if (x < 0) { OPENSSL_free(ret); return 0; } byte |= (char)x; if ((nibble ^= 1) == 0) { *cp++ = byte; byte = 0; Loading
crypto/asn1/f_int.c +2 −8 Original line number Diff line number Diff line Loading @@ -175,14 +175,8 @@ int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size) } for (j = 0; j < i; j++, k += 2) { for (n = 0; n < 2; n++) { m = bufp[k + n]; if ((m >= '0') && (m <= '9')) m -= '0'; else if ((m >= 'a') && (m <= 'f')) m = m - 'a' + 10; else if ((m >= 'A') && (m <= 'F')) m = m - 'A' + 10; else { m = OPENSSL_hexchar2int(bufp[k + n]); if (m < 0) { ASN1err(ASN1_F_A2I_ASN1_INTEGER, ASN1_R_NON_HEX_CHARACTERS); goto err; Loading
crypto/asn1/f_string.c +2 −8 Original line number Diff line number Diff line Loading @@ -167,14 +167,8 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size) } for (j = 0; j < i; j++, k += 2) { for (n = 0; n < 2; n++) { m = bufp[k + n]; if ((m >= '0') && (m <= '9')) m -= '0'; else if ((m >= 'a') && (m <= 'f')) m = m - 'a' + 10; else if ((m >= 'A') && (m <= 'F')) m = m - 'A' + 10; else { m = OPENSSL_hexchar2int(bufp[k + n]); if (m < 0) { ASN1err(ASN1_F_A2I_ASN1_STRING, ASN1_R_NON_HEX_CHARACTERS); return 0; Loading
crypto/bn/bn_print.c +2 −7 Original line number Diff line number Diff line Loading @@ -215,13 +215,8 @@ int BN_hex2bn(BIGNUM **bn, const char *a) l = 0; for (;;) { c = a[j - m]; if ((c >= '0') && (c <= '9')) k = c - '0'; else if ((c >= 'a') && (c <= 'f')) k = c - 'a' + 10; else if ((c >= 'A') && (c <= 'F')) k = c - 'A' + 10; else k = OPENSSL_hexchar2int(c); if (k < 0) k = 0; /* paranoia */ l = (l << 4) | k; Loading
crypto/pem/pem_lib.c +2 −7 Original line number Diff line number Diff line Loading @@ -558,13 +558,8 @@ static int load_iv(char **fromp, unsigned char *to, int num) to[i] = 0; num *= 2; for (i = 0; i < num; i++) { if ((*from >= '0') && (*from <= '9')) v = *from - '0'; else if ((*from >= 'A') && (*from <= 'F')) v = *from - 'A' + 10; else if ((*from >= 'a') && (*from <= 'f')) v = *from - 'a' + 10; else { v = OPENSSL_hexchar2int(*from); if (v < 0) { PEMerr(PEM_F_LOAD_IV, PEM_R_BAD_IV_CHARS); return (0); } Loading