aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/f_string.c
diff options
context:
space:
mode:
authorFlavio Medeiros <flaviomotamedeiros@gmail.com>2016-01-30 20:14:39 -0500
committerRich Salz <rsalz@openssl.org>2016-02-24 16:11:39 -0500
commitb5292f7b40fd5da1feff4d5394f84c629c97eda4 (patch)
tree0b1755c1833784c9df78809fba9ce1e06d5df68a /crypto/asn1/f_string.c
parentf7c798e34b50d3cc09629537153bb60ae9ea85fc (diff)
downloadopenssl-b5292f7b40fd5da1feff4d5394f84c629c97eda4.zip
openssl-b5292f7b40fd5da1feff4d5394f84c629c97eda4.tar.gz
openssl-b5292f7b40fd5da1feff4d5394f84c629c97eda4.tar.bz2
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/asn1/f_string.c')
-rw-r--r--crypto/asn1/f_string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asn1/f_string.c b/crypto/asn1/f_string.c
index 048f92a..7d9eb14 100644
--- a/crypto/asn1/f_string.c
+++ b/crypto/asn1/f_string.c
@@ -94,7 +94,7 @@ int i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type)
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
{
- int i, j, k, m, n, again, bufsize;
+ int i, j, k, m, n, again, bufsize, spec_char;
unsigned char *s = NULL, *sp;
unsigned char *bufp;
int num = 0, slen = 0, first = 1;
@@ -122,18 +122,18 @@ int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size)
for (j = i - 1; j > 0; j--) {
#ifndef CHARSET_EBCDIC
- if (!(((buf[j] >= '0') && (buf[j] <= '9')) ||
+ spec_char = (!(((buf[j] >= '0') && (buf[j] <= '9')) ||
((buf[j] >= 'a') && (buf[j] <= 'f')) ||
- ((buf[j] >= 'A') && (buf[j] <= 'F'))))
+ ((buf[j] >= 'A') && (buf[j] <= 'F'))));
#else
/*
* This #ifdef is not strictly necessary, since the characters
* A...F a...f 0...9 are contiguous (yes, even in EBCDIC - but
* not the whole alphabet). Nevertheless, isxdigit() is faster.
*/
- if (!isxdigit(buf[j]))
+ spec_char = (!isxdigit(buf[j]));
#endif
- {
+ if (spec_char) {
i = j;
break;
}