Patch to prevent segfault and exit with an error code and error message if a line is too long for any of the input files loaded by dump.c in the file list *alphabets
To test, substitute TestLine.txt for 8859-1.TXT and the program should stop gracefully.
To test memory released okay, restore 8859-1.TXT and substitute TestLine.txt for any file listed after 8859-1.txt, such as 8859-2.TXT
gcc -o dump dump.c
results, no segfault, and error message produced.
Log in to post a comment.