Sign in
llvm
/
llvm-archive
/
48649d2c83b557841c9e5c978d9ab5af13cb52e5
/
.
/
safecode
/
test
/
mem_safety
/
stdlib
/
stdlib-006.c
blob: ddc4ff622b3fd5c5891d027f4f5f0379df56421d [
file
] [
log
] [
blame
]
/* strcat() with the size of the destination string smaller
than required. */
#include
<string.h>
int
main
()
{
char
buf1
[
20
],
buf2
[
30
];
strcpy
(
buf2
,
"This is between 20 and 30"
);
buf1
[
0
]
=
'\0'
;
strcat
(
buf1
,
buf2
);
return
0
;
}