diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-14 05:20:03 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-08-14 05:20:03 -0700 |
commit | 9db90b0f8cdf41d5f8241babe50bed1578e8cfa1 (patch) | |
tree | b348d4cecb30456cabcee895960551ea78cd3ca0 /src/modules/submit | |
parent | 210580bb0bbd14c02c2ba929012399ec32885de1 (diff) |
til_str: handle overflows in til_str_appendf()
In the wholesale transition to til_module_setup_full() there's
been a lot more problematic randomized setups either extremely
deep or plain infinite.
Due to the primitive escaping mechanism performed by
til_settings_as_arg(), where escape patterns grow exponentially
with depth, it's quite realistic (and observed) for these
problematic setups to exceed SIZE_MAX.
So I'm putting some guard rails in to cap a given til_str_t to
SIZE_MAX. It might make more sense to move the limit well below
SIZE_MAX, but this should at least prevent overflows.
Diffstat (limited to 'src/modules/submit')
0 files changed, 0 insertions, 0 deletions