[libc-commits] [libc] [libc] Keep the terminator out of the length of a built error or signal description (PR #236516)
Alexey Samsonov via libc-commits
libc-commits at lists.llvm.org
Thu Oct 29 22:03:08 PDT 2026
vonosmas wrote:
Thank you for fixing the overflow, but your change doesn't address my comment about the confusing contract of the function, which returns a cpp::string_view, but also modifies the buffer in-place by appending a null-terminator to follow the cpp::string_view. We generally are not supposed to assume that cpp::string_view objects passed around necessary point to a buffer followed by a `\0`. It's likely that the contract of the functions here (including their callers) needs to be re-worked substantially.
https://github.com/llvm/llvm-project/pull/236516
More information about the libc-commits
mailing list