Adjusted input.c to handle buffer overflows using getline