summaryrefslogtreecommitdiff
path: root/sysutils/ccd2iso/patches/patch-aa
blob: aec6dafc081cfbd9b085958787e79771ff58d2b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-aa,v 1.1.1.1 2004/06/24 18:30:18 xtraeme Exp $

--- src/ccd2iso.c.orig	Thu Nov 13 06:43:41 2003
+++ src/ccd2iso.c	Thu Jun 24 15:31:04 2004
@@ -22,6 +22,7 @@
 #include <config.h>
 #endif
 
+#include <err.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
@@ -47,7 +48,12 @@
 	}
 
 	src_file = fopen(argv[1], "r");
+	if (src_file == NULL)
+		err(1, "%s", argv[1]);
+
 	dst_file = fopen(argv[2], "w");
+	if (dst_file == NULL)
+		err(1, "%s", argv[2]);
 
 	stat(argv[1], &stat_file);
 	total_bytes = stat_file.st_size;