mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fixes UTF8 to Unicode conversion bug in 4-byte encodings
This commit is contained in:
parent
7e459827e0
commit
5b0c933cf3
@ -236,7 +236,7 @@ char *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int inp
|
||||
count+=7;
|
||||
if(count <= len) {
|
||||
/* compute character number */
|
||||
d = ((c & 0x07) << 18) | ((*(utf + 1) & 0x3F) << 12) | ((*(utf + 2) & 0x3F) < 6) | (*(utf + 3) & 0x3F);
|
||||
d = ((c & 0x07) << 18) | ((*(utf + 1) & 0x3F) << 12) | ((*(utf + 2) & 0x3F) << 6) | (*(utf + 3) & 0x3F);
|
||||
*data++ = '%';
|
||||
*data++ = 'u';
|
||||
unicode = apr_psprintf(mp, "%x", d);
|
||||
|
Loading…
x
Reference in New Issue
Block a user