Skip to content

{with,new}CStringLen do not NUL terminate their output

In !10110 (closed) I was surprised to discover that {with,new}CStringLen do not NUL terminate their output. This appears to be intentional but is not clearly articulated in the documentation and frankly invites misuse. This I do wonder whether this decision should be revisited; at very least the documentation should be clarified.

If we decide not to redefine the semantics of the operation, I suspect we should instead introduce a pair of new operations which do NUL terminate their output.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information