diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-29 11:03:00 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-29 15:04:15 +0100 |
commit | a1f82f06399f6c3cbee2009a498f4e7e620b2330 (patch) | |
tree | 30fead95f7d184e7cb0b997831a2aa9fe5e6524d /crypto/conf | |
parent | 97a982e2eee2e04e8e41ae12665af417315a0f23 (diff) |
Fix EBCDIC problem in conf_def.h
The non-ascii version of this set of macros ensures that the "a" variable
is inside the expected range. This logic wasn't quite right for the
EBCDIC version.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_def.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crypto/conf/conf_def.h b/crypto/conf/conf_def.h index 21a41ea01b..76135936bd 100644 --- a/crypto/conf/conf_def.h +++ b/crypto/conf/conf_def.h @@ -95,18 +95,18 @@ #else /* CHARSET_EBCDIC */ -# define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_COMMENT) -# define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_FCOMMENT) -# define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_EOF) -# define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_ESC) -# define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_NUMBER) -# define IS_WS(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_WS) -# define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_ALPHA_NUMERIC) +# define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_COMMENT) +# define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_FCOMMENT) +# define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_EOF) +# define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ESC) +# define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_NUMBER) +# define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_WS) +# define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC) # define IS_ALPHA_NUMERIC_PUNCT(c,a) \ - (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT) -# define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_QUOTE) -# define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_DQUOTE) -# define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[(int)a]&0xff]&CONF_HIGHBIT) + (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC_PUNCT) +# define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_QUOTE) +# define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_DQUOTE) +# define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_HIGHBIT) #endif /* CHARSET_EBCDIC */ static const unsigned short CONF_type_default[256] = { |