1 // commit 211264e46a2f1bc382a84435e904d1548de672b0 2013-09-27
2 // mbsrtowcs should not write outside the ws array
8 wchar_t ws
[] = L
"XXXXX";
9 const char *src
= "abcd";
10 const char *want
= src
+ 4;
13 r
= mbsrtowcs(ws
, &src
, 4, 0);
15 t_error("mbsrtowcs(ws, &abcd, 4, 0) returned %zu, wanted 4\n", r
);
17 t_error("mbsrtowcs(ws, &abcd, 4, 0) set abcd to %p wanted %p\n", src
, want
);
18 if (wcscmp(ws
, L
"abcdX") != 0)
19 t_error("ws is L\"%ls\", wanted L\"abcdX\"\n", ws
);