flockfile list corruption test
[libc-test.git] / src / regression / wcsncpy-read-overflow.c
blob05c943db4c8827459e2a75bb70e596e451144d80
1 // commit: e98136207ad1a6df1cdc1578e4ad56f8f0db4047 2011-05-22
2 #include <wchar.h>
3 #include "test.h"
5 int main(void)
7 wchar_t dst[] = { 'a', 'a' };
8 wchar_t src[] = { 0, 'b' };
10 wcsncpy(dst, src, 1);
11 if(dst[1] != 'a')
12 t_error("wcsncpy copied more than N\n");
13 return t_status;