提交 0636c39b 编写于 作者: L Lutz Jänicke

Fix incorrect handling of special characters

PR: 1459
Submitted by: tnitschke@innominate.com
Reviewed by: steve@openssl.org
上级 a2e623c0
...@@ -170,7 +170,7 @@ static int do_buf(unsigned char *buf, int buflen, ...@@ -170,7 +170,7 @@ static int do_buf(unsigned char *buf, int buflen,
q = buf + buflen; q = buf + buflen;
outlen = 0; outlen = 0;
while(p != q) { 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; else orflags = 0;
switch(type & BUF_TYPE_WIDTH_MASK) { switch(type & BUF_TYPE_WIDTH_MASK) {
case 4: case 4:
...@@ -197,7 +197,7 @@ static int do_buf(unsigned char *buf, int buflen, ...@@ -197,7 +197,7 @@ static int do_buf(unsigned char *buf, int buflen,
default: default:
return -1; /* invalid width */ 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) { if(type & BUF_TYPE_CONVUTF8) {
unsigned char utfbuf[6]; unsigned char utfbuf[6];
int utflen; int utflen;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册