mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Merge pull request #1895 from wangtsiao/dev/fix_utf8_mask
修复 ASN.1 UTF8String 多字节字符校验
This commit is contained in:
@@ -1281,7 +1281,7 @@ static int asn1_utf8char_from_bytes(uint32_t *c, const uint8_t **pin, size_t *pi
|
||||
|
||||
utf8char = in[0];
|
||||
for (i = 1; i < utf8char_len; i++) {
|
||||
if ((in[i] & 0x60) != 0x80) {
|
||||
if ((in[i] & 0xc0) != 0x80) {
|
||||
//error_print(); // disable error_print for _is_ compare
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user