Sign in
llvm
/
llvm-archive
/
48649d2c83b557841c9e5c978d9ab5af13cb52e5
/
.
/
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
;
}