Sign in
llvm
/
llvm-archive
/
48649d2c83b557841c9e5c978d9ab5af13cb52e5
/
.
/
safecode
/
test
/
cstdlib
/
strncpy-001.c
blob: 15c4d6ad7de724de472b86ce5e749db8a4007ffb [
file
] [
log
] [
blame
]
// RUN: test.sh -e -t %t %s
#include
<string.h>
// strncpy() with too short a destination.
int
main
()
{
char
dst
[
10
];
char
pad
[
100
];
char
src
[]
=
"A string"
;
strncpy
(&
dst
[
0
],
&
src
[
0
],
11
);
return
0
;
}