aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2004-06-24 19:45:44 +0800
committerosa <osa@FreeBSD.org>2004-06-24 19:45:44 +0800
commit467b2fa332216ebceac8c3fbba25b9b1ea9320de (patch)
treeef737c9b2eb942eb531fd86d31e0b7a3504c37e4 /sysutils
parente751162601f0b7dc73eb1c84138802631c1b740e (diff)
downloadfreebsd-ports-gnome-467b2fa332216ebceac8c3fbba25b9b1ea9320de.tar.gz
freebsd-ports-gnome-467b2fa332216ebceac8c3fbba25b9b1ea9320de.tar.zst
freebsd-ports-gnome-467b2fa332216ebceac8c3fbba25b9b1ea9320de.zip
Fix segmantation fault by checking variables after fopen(3) calls.
Author already notified about this problem. Bump PORTREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ccd2iso/Makefile1
-rw-r--r--sysutils/ccd2iso/files/patch-src-ccd2iso.c26
2 files changed, 27 insertions, 0 deletions
diff --git a/sysutils/ccd2iso/Makefile b/sysutils/ccd2iso/Makefile
index ab18c345b1c1..c18d17fadcf7 100644
--- a/sysutils/ccd2iso/Makefile
+++ b/sysutils/ccd2iso/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ccd2iso
PORTVERSION= 0.9
+PORTREVISION?= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/sysutils/ccd2iso/files/patch-src-ccd2iso.c b/sysutils/ccd2iso/files/patch-src-ccd2iso.c
new file mode 100644
index 000000000000..65219723dd75
--- /dev/null
+++ b/sysutils/ccd2iso/files/patch-src-ccd2iso.c
@@ -0,0 +1,26 @@
+
+$FreeBSD$
+
+--- 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;