diff options
author | Flavio Medeiros <flaviomotamedeiros@gmail.com> | 2016-01-31 02:14:39 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-24 22:11:39 +0100 |
commit | b5292f7b40fd5da1feff4d5394f84c629c97eda4 (patch) | |
tree | 0b1755c1833784c9df78809fba9ce1e06d5df68a /apps/req.c | |
parent | Fix typo, reformat comment. (diff) | |
download | openssl-b5292f7b40fd5da1feff4d5394f84c629c97eda4.tar.xz openssl-b5292f7b40fd5da1feff4d5394f84c629c97eda4.zip |
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 'apps/req.c')
-rw-r--r-- | apps/req.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/apps/req.c b/apps/req.c index facc63967d..28ed036794 100644 --- a/apps/req.c +++ b/apps/req.c @@ -1120,7 +1120,7 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk, STACK_OF(CONF_VALUE) *attr_sk, int attribs, unsigned long chtype) { - int i; + int i, spec_char, plus_char; char *p, *q; char *type; CONF_VALUE *v; @@ -1136,24 +1136,26 @@ static int auto_info(X509_REQ *req, STACK_OF(CONF_VALUE) *dn_sk, /* * Skip past any leading X. X: X, etc to allow for multiple instances */ - for (p = v->name; *p; p++) + for (p = v->name; *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 (*p == '+') + plus_char = (*p == '+'); #else - if (*p == os_toascii['+']) + plus_char = (*p == os_toascii['+']); #endif - { + if (plus_char) { p++; mval = -1; } else |