[libc-commits] [libc] [libc] return -1 when v/swprintf truncate output (PR #245838)
via libc-commits
libc-commits at lists.llvm.org
Thu Nov 26 15:42:56 PST 2026
================
@@ -122,7 +126,8 @@ TEST_F(LlvmLibcVSWPrintfTest, CutOff) {
// passing null as the output pointer is allowed as long as bufsz is 0.
written = call_vswprintf(nullptr, 0, L"%s and more", "1234567890");
- EXPECT_EQ(written, 19);
+ EXPECT_LT(written, 0);
+ ASSERT_ERRNO_FAILURE();
}
----------------
un-pixelated wrote:
Please add the same test requested above, but for `vswprintf`
https://github.com/llvm/llvm-project/pull/245838
More information about the libc-commits
mailing list