Sign in
llvm
/
llvm-archive
/
f8b4f79771a41ee0a0f02ac90619d37ccd834915
/
.
/
safecode
/
test
/
mem_safety
/
stdlib
/
stdlib-007.c
blob: 48c35a95c3460ba98bdc223e8862bb0485ec1824 [
file
] [
log
] [
blame
]
/* memcpy() with the size of the destination smaller than given */
#include
<string.h>
int
main
()
{
char
buf1
[
20
],
buf2
[
30
];
strcpy
(
buf2
,
"This is between 20 and 30"
);
memcpy
(
buf1
,
buf2
,
30
);
return
0
;
}