Merge pull request #1895 from wangtsiao/dev/fix_utf8_mask

修复 ASN.1 UTF8String 多字节字符校验
This commit is contained in:
Zhi Guan
2026-06-13 17:23:55 +08:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -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;
}