diff options
author | Lutz Jänicke <jaenicke@openssl.org> | 2007-02-21 17:44:53 +0000 |
---|---|---|
committer | Lutz Jänicke <jaenicke@openssl.org> | 2007-02-21 17:44:53 +0000 |
commit | 0636c39bb153110dcb2b04d59229cebd0bf3ca39 (patch) | |
tree | 480d0a6c92df5cad5f350ab67b2543bf26d48eb2 /crypto | |
parent | a2e623c0118b0a8149b3a87ff90eb0461a406bd2 (diff) |
Fix incorrect handling of special characters
PR: 1459
Submitted by: tnitschke@innominate.com
Reviewed by: steve@openssl.org
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/a_strex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index fc743c2ad0..c2dbb6f9a5 100644 --- a/crypto/asn1/a_strex.c +++ b/crypto/asn1/a_strex.c @@ -170,7 +170,7 @@ static int do_buf(unsigned char *buf, int buflen, q = buf + buflen; outlen = 0; while(p != q) { - if(p == buf) orflags = CHARTYPE_FIRST_ESC_2253; + if(p == buf && flags & ASN1_STRFLGS_ESC_2253) orflags = CHARTYPE_FIRST_ESC_2253; else orflags = 0; switch(type & BUF_TYPE_WIDTH_MASK) { case 4: @@ -197,7 +197,7 @@ static int do_buf(unsigned char *buf, int buflen, default: return -1; /* invalid width */ } - if (p == q) orflags = CHARTYPE_LAST_ESC_2253; + if (p == q && flags & ASN1_STRFLGS_ESC_2253) orflags = CHARTYPE_LAST_ESC_2253; if(type & BUF_TYPE_CONVUTF8) { unsigned char utfbuf[6]; int utflen; |