Skip to content

Commit

Permalink
wsutil: Remove defective sanity check
Browse files Browse the repository at this point in the history
Fixes #19107.
  • Loading branch information
randstr authored and johnthacker committed May 27, 2023
1 parent f653e52 commit 04f15b9
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions wsutil/to_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 04f15b9

Please sign in to comment.