Sign in
llvm
/
llvm-archive
/
f91d1660b4827134c7666ae9637f21a2741d183f
/
.
/
safecode
/
test
/
cstdlib
/
strcat-006.c
blob: b6a83fba6cb422264a095ade0a8a4fd0d628716e [
file
] [
log
] [
blame
]
// RUN: test.sh -e -t %t %s
// strcat() onto the end of an object that is not nul terminated,
// but the front of the object is.
#include
<string.h>
int
main
()
{
char
dst
[
100
]
=
""
;
memset
(&
dst
[
1
],
'a'
,
99
);
strcat
(&
dst
[
1
],
"string"
);
return
0
;
}