mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Fix buffer size for utf8toUnicode transformation
This commit is contained in:
parent
d8c711257b
commit
b600669d02
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
||||
DD MMM YYYY - 2.9.3 - To be released
|
||||
------------------------------------
|
||||
|
||||
* Fix buffer size for utf8toUnicode transformation
|
||||
[Issue #1208 - @katef, @victorhora]
|
||||
* Fix sanitizing JSON request bodies in native audit log format
|
||||
[p0pr0ck5, @victorhora]
|
||||
* IIS: Update Wix installer to bundle a supported CRS version (3.0)
|
||||
|
@ -113,8 +113,9 @@ char *utf8_unicode_inplace_ex(apr_pool_t *mp, unsigned char *input, long int inp
|
||||
unsigned char *unicode = NULL;
|
||||
|
||||
*changed = 0;
|
||||
|
||||
len = input_len * 7 + 1;
|
||||
/* RFC3629 states that UTF-8 are encoded using sequences of 1 to 4 octets. */
|
||||
/* Max size per character should fit in 4 bytes */
|
||||
len = input_len * 4 + 1;
|
||||
data = rval = apr_palloc(mp, len);
|
||||
if (rval == NULL) return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user