Fix utf-8 character encoding conversion

Reported on: #1794
This commit is contained in:
Felipe Zimmerle 2018-09-04 21:00:26 -03:00
parent f66cd4111f
commit 739048749e
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
DD MMM YYYY - 2.9.3 - To be released DD MMM YYYY - 2.9.3 - To be released
------------------------------------ ------------------------------------
* Fix utf-8 character encoding conversion
[Issue #1794 - @tinselcity, @zimmerle]
* Fix ip tree lookup on netmask content * Fix ip tree lookup on netmask content
[Issue #1793 - @tinselcity, @zimmerle] [Issue #1793 - @tinselcity, @zimmerle]
* IIS: set overrideModeDefault to Allow so that individual websites can * IIS: set overrideModeDefault to Allow so that individual websites can

View File

@ -4321,7 +4321,7 @@ static int detect_utf8_character(const unsigned char *p_read, unsigned int lengt
else { else {
unicode_len = 4; unicode_len = 4;
/* compute character number */ /* compute character number */
d = ((c & 0x07) << 18) | ((*(p_read + 1) & 0x3F) << 12) | ((*(p_read + 2) & 0x3F) < 6) | (*(p_read + 3) & 0x3F); d = ((c & 0x07) << 18) | ((*(p_read + 1) & 0x3F) << 12) | ((*(p_read + 2) & 0x3F) << 6) | (*(p_read + 3) & 0x3F);
} }
} }
/* any other first byte is invalid (RFC 3629) */ /* any other first byte is invalid (RFC 3629) */