projects
/
libc-test
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add 64bit strtol/strtoul and strtoll/strtoull tests
[libc-test]
/
src
/
regression
/
wcsncpy-read-overflow.c
1
// commit: e98136207ad1a6df1cdc1578e4ad56f8f0db4047 2011-05-22
2
#include <wchar.h>
3
#include "test.h"
4
5
int main(void)
6
{
7
wchar_t dst[] = { 'a', 'a' };
8
wchar_t src[] = { 0, 'b' };
9
10
wcsncpy(dst, src, 1);
11
if(dst[1] != 'a')
12
t_error("wcsncpy copied more than N\n");
13
return t_status;
14
}