Sign in
llvm
/
llvm-archive
/
089ca8750d7cd1f1ec96968922bf4bcfe223bb3a
/
.
/
safecode
/
test
/
cstdlib
/
strncat-002.c
blob: 7a5e21ca4f2f3fc061a73107d6384f772f90448c [
file
] [
log
] [
blame
]
// RUN: test.sh -e -t %t %s
// strncat() reads out of bounds from the source string.
#include
<string.h>
int
main
()
{
char
a
[
1000
];
char
b
[
100
];
a
[
0
]
=
'\0'
;
memset
(
b
,
'b'
,
100
);
strncat
(
a
,
b
,
1000
);
return
0
;
}