File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ add_entrypoint_object(
195195 libc.hdr.types.wchar_t
196196 libc.src.__support.common
197197 libc.src.__support.macros .config
198+ libc.src.__support.macros .null_check
198199 libc.src.__support.libc_errno
199200 libc.src.__support.wchar.mbstate
200201 libc.src.__support.wchar.mbsnrtowcs
Original file line number Diff line number Diff line change 1313#include " src/__support/common.h"
1414#include " src/__support/libc_errno.h"
1515#include " src/__support/macros/config.h"
16+ #include " src/__support/macros/null_check.h"
1617#include " src/__support/wchar/mbsnrtowcs.h"
1718#include " src/__support/wchar/mbstate.h"
1819
@@ -21,6 +22,7 @@ namespace LIBC_NAMESPACE_DECL {
2122LLVM_LIBC_FUNCTION (size_t , mbstowcs,
2223 (wchar_t *__restrict pwcs, const char *__restrict s,
2324 size_t n)) {
25+ LIBC_CRASH_ON_NULLPTR (s);
2426 // If destination is null, ignore n
2527 n = pwcs == nullptr ? SIZE_MAX : n;
2628 static internal::mbstate internal_mbstate;
You can’t perform that action at this time.
0 commit comments