Sign in
llvm
/
llvm-archive
/
089ca8750d7cd1f1ec96968922bf4bcfe223bb3a
/
.
/
safecode
/
test
/
mem_safety
/
stdlib
/
stdlib-024.c
blob: cc50c010c8e57567eb3631dfe1b3f4f01e974409 [
file
] [
log
] [
blame
]
/* strncat with allocated memory */
#include
<stdlib.h>
#include
<string.h>
int
main
()
{
char
*
ptr
;
ptr
=
malloc
(
10
);
ptr
[
0
]
=
'\0'
;
strncat
(
ptr
,
"1234567890"
,
11
);
free
(
ptr
);
}