Nikolas Klauser 15860446a8
[libc++] Fix basic_string not allowing max_size() elements to be stored (#125423)
Without this patch `basic_string` cannot be properly resized to be
`max_size()` elements in size, even if an allocation is successful.
`__grow_by` allocates one less element than required, resulting in an
out-of-bounds access. At the same time, `max_size()` has an off-by-one
error, since there has to be space to store the null terminator, which
is currently ignored.
2025-02-23 19:02:14 +01:00
..