[SOLVED] CS /* Reads from a file into a bad address.

$25

File Name: CS_/*_Reads_from_a_file_into_a_bad_address..zip
File Size: 405.06 KB

5/5 - (1 vote)

/* Reads from a file into a bad address.
The process must be terminated with -1 exit code. */

#include
#include tests/lib.h
#include tests/main.h

void
test_main (void)
{
int handle;

CHECK ((handle = open (sample.txt)) > 1, open sample.txt);
read (handle, (char *) &handle 4096, 1);
fail (survived reading data into bad address);
}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS /* Reads from a file into a bad address.
$25