Commit 331edd6b authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by conrad

Fix oggz-dump -r segfault when input doesn't exist

The return value of fopen() simply wasn't being checked.
parent f350abe6
......@@ -403,6 +403,17 @@ revert_file (char * infilename)
infile = fopen (infilename, "rb");
if (infile == NULL) {
if (errno == 0) {
fprintf (stderr, "%s: %s: error opening input file\n",
progname, infilename);
} else {
fprintf (stderr, "%s: %s: %s\n",
progname, infilename, strerror (errno));
if (oggz == NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment