From: Lutz Jänicke Date: Wed, 21 Feb 2007 17:44:08 +0000 (+0000) Subject: Fix incorrect handling of special characters. X-Git-Tag: OpenSSL_0_9_7m~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4804720353f8e3dec9a5ff89bc909f611596e9bd;p=oweals%2Fopenssl.git Fix incorrect handling of special characters. PR: 1459 Submitted by: tnitschke@innominate.com Reviewed by: steve@openssl.org --- diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c index a07122ba47..5155bab351 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: @@ -195,7 +195,7 @@ static int do_buf(unsigned char *buf, int buflen, p += i; break; } - 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;