diff options
author | Pauli <paul.dale@oracle.com> | 2017-08-21 07:19:17 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-08-22 09:45:25 +1000 |
commit | a1df06b36347a31c17d09e6ca3e1464bdf7eb4d5 (patch) | |
tree | beb260df46896a5c8668dd7f64c5dcefe677b1e6 /crypto/asn1/a_gentm.c | |
parent | 00dfbaad88a69ed8294d6039bf5f7d722f72bf39 (diff) |
This has been added to avoid the situation where some host ctype.h functions
return true for characters > 127. I.e. they are allowing extended ASCII
characters through which then cause problems. E.g. marking superscript '2' as
a number then causes the common (ch - '0') conversion to number to fail
miserably. Likewise letters with diacritical marks can also cause problems.
If a non-ASCII character set is being used (currently only EBCDIC), it is
adjusted for.
The implementation uses a single table with a bit for each of the defined
classes. These functions accept an int argument and fail for
values out of range or for characters outside of the ASCII set. They will
work for both signed and unsigned character inputs.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4102)
Diffstat (limited to 'crypto/asn1/a_gentm.c')
-rw-r--r-- | crypto/asn1/a_gentm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c index 4e2e815d27..d3878d6e57 100644 --- a/crypto/asn1/a_gentm.c +++ b/crypto/asn1/a_gentm.c @@ -13,7 +13,6 @@ #include <stdio.h> #include <time.h> -#include <ctype.h> #include "internal/cryptlib.h" #include <openssl/asn1.h> #include "asn1_locl.h" |