repo.or.cz
/
libc-test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
flockfile list corruption test
[libc-test.git]
/
src
/
regression
/
wcsncpy-read-overflow.c
blob
05c943db4c8827459e2a75bb70e596e451144d80
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
}