Sign in
llvm
/
llvm-archive
/
f8b4f79771a41ee0a0f02ac90619d37ccd834915
/
.
/
safecode
/
test
/
cstdlib
/
strncat-003.c
blob: 25d4f46d876126a696fcc5a29a9fcb018ecf2942 [
file
] [
log
] [
blame
]
// RUN: test.sh -e -t %t %s
// The destination string is written to out of bounds.
#include
<string.h>
int
main
()
{
char
a
[
10
];
char
b
[
500
];
a
[
0
]
=
'\0'
;
memset
(
b
,
'b'
,
10
);
strncat
(
a
,
b
,
50
);
return
0
;
}