blob: 1863ca42afeeba79163e7c0fa67b5cdfd4ec29bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--- a/src/b5i2iso.c
+++ b/src/b5i2iso.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -45,6 +46,10 @@
}
fsource = fopen(argv[1],"rb");
+if (fsource == NULL) {
+ printf("can't open %s: %s\n", argv[1], strerror(errno));
+ exit(EXIT_FAILURE);
+}
fdest = fopen(destfilename,"wb");
fseek(fsource, 2352, SEEK_CUR);
|