The size increase test is "escaped->used + delimits + 2", but actual arguments passed to the increase function is "delimits".
The "+2" is missing.
This gets caught by the parameter checker when delimits is 0.
When delimits is, say 1, then an insufficient amount of memory is increased.
This will likely result in a segfault.
if (content.string[i] == quote) {
if (escaped->used + delimits + 2 > escaped->size) {
- status = fl_string_dynamic_size_increase(delimits, escaped);
+ status = fl_string_dynamic_size_increase(delimits + 2, escaped);
if (F_status_is_error(status)) return status;
}