Sign in
llvm
/
llvm-archive
/
f91d1660b4827134c7666ae9637f21a2741d183f
/
.
/
safecode
/
test
/
mem_safety
/
stdlib
/
stdlib-034.c
blob: 9c433dc0f73cfabb55d0d120d8bd59a58c89bfd4 [
file
] [
log
] [
blame
]
/* Read from NULL pointer. */
#include
<unistd.h>
int
main
()
{
int
fds
[
2
];
char
*
string
=
"String"
;
pipe
(
fds
);
write
(
fds
[
1
],
string
,
sizeof
(
string
));
read
(
fds
[
0
],
NULL
,
sizeof
(
string
));
close
(
fds
[
0
]);
close
(
fds
[
1
]);
return
0
;
}