mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 18:07:00 -06:00
update Brotli to version 1.0.6
This commit is contained in:
@@ -25,37 +25,37 @@ static size_t BrotliParseAsUTF8(
|
||||
}
|
||||
/* 2-byte UTF8 */
|
||||
if (size > 1u &&
|
||||
(input[0] & 0xe0) == 0xc0 &&
|
||||
(input[1] & 0xc0) == 0x80) {
|
||||
*symbol = (((input[0] & 0x1f) << 6) |
|
||||
(input[1] & 0x3f));
|
||||
if (*symbol > 0x7f) {
|
||||
(input[0] & 0xE0) == 0xC0 &&
|
||||
(input[1] & 0xC0) == 0x80) {
|
||||
*symbol = (((input[0] & 0x1F) << 6) |
|
||||
(input[1] & 0x3F));
|
||||
if (*symbol > 0x7F) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
/* 3-byte UFT8 */
|
||||
if (size > 2u &&
|
||||
(input[0] & 0xf0) == 0xe0 &&
|
||||
(input[1] & 0xc0) == 0x80 &&
|
||||
(input[2] & 0xc0) == 0x80) {
|
||||
*symbol = (((input[0] & 0x0f) << 12) |
|
||||
((input[1] & 0x3f) << 6) |
|
||||
(input[2] & 0x3f));
|
||||
if (*symbol > 0x7ff) {
|
||||
(input[0] & 0xF0) == 0xE0 &&
|
||||
(input[1] & 0xC0) == 0x80 &&
|
||||
(input[2] & 0xC0) == 0x80) {
|
||||
*symbol = (((input[0] & 0x0F) << 12) |
|
||||
((input[1] & 0x3F) << 6) |
|
||||
(input[2] & 0x3F));
|
||||
if (*symbol > 0x7FF) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
/* 4-byte UFT8 */
|
||||
if (size > 3u &&
|
||||
(input[0] & 0xf8) == 0xf0 &&
|
||||
(input[1] & 0xc0) == 0x80 &&
|
||||
(input[2] & 0xc0) == 0x80 &&
|
||||
(input[3] & 0xc0) == 0x80) {
|
||||
(input[0] & 0xF8) == 0xF0 &&
|
||||
(input[1] & 0xC0) == 0x80 &&
|
||||
(input[2] & 0xC0) == 0x80 &&
|
||||
(input[3] & 0xC0) == 0x80) {
|
||||
*symbol = (((input[0] & 0x07) << 18) |
|
||||
((input[1] & 0x3f) << 12) |
|
||||
((input[2] & 0x3f) << 6) |
|
||||
(input[3] & 0x3f));
|
||||
if (*symbol > 0xffff && *symbol <= 0x10ffff) {
|
||||
((input[1] & 0x3F) << 12) |
|
||||
((input[2] & 0x3F) << 6) |
|
||||
(input[3] & 0x3F));
|
||||
if (*symbol > 0xFFFF && *symbol <= 0x10FFFF) {
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user