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