Sign in
llvm
/
llvm-archive
/
f8b4f79771a41ee0a0f02ac90619d37ccd834915
/
.
/
safecode
/
test
/
cstdlib
/
strncat-001.c
blob: efe2f3a529511a0ac55b227524c0ee91cd5ad3e2 [
file
] [
log
] [
blame
]
// RUN: test.sh -e -t %t %s
// This is an example of a destination string too short for strncat().
#include
<string.h>
int
main
()
{
char
a
[
10
];
char
b
[
100
];
memset
(
a
,
'a'
,
9
);
a
[
9
]
=
'\0'
;
memset
(
b
,
'b'
,
100
);
strncat
(
a
,
b
,
1
);
return
0
;
}