In _withFixedCharBuffer helper, we allocate a buffer with the requested size + 1 (for null-termination). With the assumption that the closure's return value len <= the requested size, the null-terminated character should be on index len, not len + 1.
In
_withFixedCharBuffer
helper, we allocate a buffer with the requested size + 1 (for null-termination). With the assumption that the closure's return valuelen <= the requested size
, the null-terminated character should be on indexlen
, notlen + 1
.Fixes rdar://129154192