diff options
author | Flavio Medeiros <flaviomotamedeiros@gmail.com> | 2016-01-30 20:14:39 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-24 16:11:39 -0500 |
commit | b5292f7b40fd5da1feff4d5394f84c629c97eda4 (patch) | |
tree | 0b1755c1833784c9df78809fba9ce1e06d5df68a /crypto/x509v3/v3_utl.c | |
parent | f7c798e34b50d3cc09629537153bb60ae9ea85fc (diff) |
GH480: Don't break statements with CPP stuff.
This is also RT 4137
Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'crypto/x509v3/v3_utl.c')
-rw-r--r-- | crypto/x509v3/v3_utl.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index 29a375d4ed..66b5711aff 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -1303,7 +1303,7 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, unsigned long chtype) { CONF_VALUE *v; - int i, mval; + int i, mval, spec_char, plus_char; char *p, *type; if (!nm) return 0; @@ -1314,25 +1314,26 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk, /* * Skip past any leading X. X: X, etc to allow for multiple instances */ - for (p = type; *p; p++) + for (p = type; *p; p++) { #ifndef CHARSET_EBCDIC - if ((*p == ':') || (*p == ',') || (*p == '.')) + spec_char = ((*p == ':') || (*p == ',') || (*p == '.')); #else - if ((*p == os_toascii[':']) || (*p == os_toascii[',']) - || (*p == os_toascii['.'])) + spec_char = ((*p == os_toascii[':']) || (*p == os_toascii[',']) + || (*p == os_toascii['.'])); #endif - { + if (spec_char) { p++; if (*p) type = p; break; } + } #ifndef CHARSET_EBCDIC - if (*type == '+') + plus_char = (*type == '+'); #else - if (*type == os_toascii['+']) + plus_char = (*type == os_toascii['+']); #endif - { + if (plus_char) { mval = -1; type++; } else |