wsutil: Remove defective sanity check

Fixes #19107.
This commit is contained in:
João Valverde 2023-05-27 12:51:47 +01:00 committed by John Thacker
parent f653e52e0f
commit 04f15b9f07
1 changed files with 0 additions and 12 deletions

View File

@ -232,12 +232,6 @@ bytes_to_str_punct_maxlen(wmem_allocator_t *scope,
if (!punct)
return bytes_to_str_maxlen(scope, src, src_size, max_bytes_len);
/* Sanity check */
if (src_size > 8192) {
src_size = 8192;
truncated = 1;
}
if (max_bytes_len == 0 || max_bytes_len > src_size) {
max_bytes_len = src_size;
}
@ -274,12 +268,6 @@ bytes_to_str_maxlen(wmem_allocator_t *scope,
ws_return_str_if_null(scope, src);
ws_return_str_if_zero(scope, src_size);
/* Sanity check */
if (src_size > 8192) {
src_size = 8192;
truncated = 1;
}
if (max_bytes_len == 0 || max_bytes_len > src_size) {
max_bytes_len = src_size;
}