#include #include extern void do_something(char *s); void process_something(int size) { int fd; // Catch integer overflow. if (size > size+1) abort(); // Error checking from this code elided. char *string = malloc(size+1); read(fd, string, size); string[size] = 0; do_something(string); free(string); }