aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorceri <ceri@FreeBSD.org>2004-11-16 02:23:39 +0800
committerceri <ceri@FreeBSD.org>2004-11-16 02:23:39 +0800
commit705fbc8ad4823ee39b1d97526c65267302336040 (patch)
treeb6c5ef7abb59b8f4654d9fd8876446f843e5291d /databases
parent76fec90acec6b8e7dbfbedad13747c5a523c417c (diff)
downloadfreebsd-ports-gnome-705fbc8ad4823ee39b1d97526c65267302336040.tar.gz
freebsd-ports-gnome-705fbc8ad4823ee39b1d97526c65267302336040.tar.zst
freebsd-ports-gnome-705fbc8ad4823ee39b1d97526c65267302336040.zip
Correct some potential buffer overflows [1].
Take maintainership [2]. [1] PR: ports/56006 Submitted by: eik [2] Approved by: des
Diffstat (limited to 'databases')
-rw-r--r--databases/gnats/Makefile4
-rw-r--r--databases/gnats/files/patch-gnats::files.c29
-rw-r--r--databases/gnats/files/patch-gnats::gen-index.c11
-rw-r--r--databases/gnats/files/patch-gnats::index.c11
-rw-r--r--databases/gnats/files/patch-gnats::internal.c11
5 files changed, 64 insertions, 2 deletions
diff --git a/databases/gnats/Makefile b/databases/gnats/Makefile
index 0edc0d896400..cd24d7aece58 100644
--- a/databases/gnats/Makefile
+++ b/databases/gnats/Makefile
@@ -7,12 +7,12 @@
PORTNAME= gnats
PORTVERSION= 3.113.1
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= databases elisp
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gnats
-MAINTAINER= des@FreeBSD.org
+MAINTAINER= ceri@FreeBSD.org
COMMENT= Cygnus GNATS bug tracking system
BUILD_DEPENDS= gm4:${PORTSDIR}/devel/m4
diff --git a/databases/gnats/files/patch-gnats::files.c b/databases/gnats/files/patch-gnats::files.c
new file mode 100644
index 000000000000..3bc91f566831
--- /dev/null
+++ b/databases/gnats/files/patch-gnats::files.c
@@ -0,0 +1,29 @@
+--- gnats/files.c.orig Mon Feb 12 06:36:25 2001
++++ gnats/files.c Sat Jun 14 13:17:58 2003
+@@ -271,7 +271,7 @@
+ char *path = (char *) alloca (PATH_MAX);
+
+ memset (array, 0, NUM_RESPONSIBLE_FIELDS * sizeof (char *));
+- sprintf (path, "%s/gnats-adm/%s", gnats_root, RESPONSIBLE_FILE);
++ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, RESPONSIBLE_FILE);
+ fp = fopen (path, "r");
+ if (fp == NULL)
+ return 0;
+@@ -358,7 +358,7 @@
+ int i, nerrs = 0;
+
+ memset (array, 0, NUM_CLASS_FIELDS * sizeof (char *));
+- sprintf (path, "%s/gnats-adm/%s", gnats_root, CLASSES);
++ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, CLASSES);
+ fp = fopen (path, "r");
+
+ if (fp == NULL)
+@@ -593,7 +593,7 @@
+ int i, nerrs = 0;
+
+ memset (array, 0, NUM_STATE_FIELDS * sizeof (char *));
+- sprintf (path, "%s/gnats-adm/%s", gnats_root, STATES);
++ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, STATES);
+ fp = fopen (path, "r");
+
+ if (fp == NULL)
diff --git a/databases/gnats/files/patch-gnats::gen-index.c b/databases/gnats/files/patch-gnats::gen-index.c
new file mode 100644
index 000000000000..d4205d2ccd09
--- /dev/null
+++ b/databases/gnats/files/patch-gnats::gen-index.c
@@ -0,0 +1,11 @@
+--- gnats/gen-index.c.orig Wed Sep 22 08:18:39 1999
++++ gnats/gen-index.c Sat Jun 14 13:19:58 2003
+@@ -256,7 +256,7 @@
+ Categories *c;
+
+ if (! catfile)
+- sprintf (path, "%s/gnats-adm/%s", gnats_root, CATEGORIES);
++ snprintf (path, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, CATEGORIES);
+ else
+ path = catfile;
+
diff --git a/databases/gnats/files/patch-gnats::index.c b/databases/gnats/files/patch-gnats::index.c
new file mode 100644
index 000000000000..c897a2ea5cdb
--- /dev/null
+++ b/databases/gnats/files/patch-gnats::index.c
@@ -0,0 +1,11 @@
+--- gnats/index.c.orig Thu Mar 18 08:45:38 1999
++++ gnats/index.c Sat Jun 14 13:22:21 2003
+@@ -399,7 +399,7 @@
+ if (! index_filename)
+ {
+ index_filename = (char *) xmalloc (PATH_MAX);
+- sprintf (index_filename, "%s/gnats-adm/%s", gnats_root, INDEX);
++ snprintf (index_filename, PATH_MAX-1, "%s/gnats-adm/%s", gnats_root, INDEX);
+ }
+
+ fp = fopen (index_filename, "r");
diff --git a/databases/gnats/files/patch-gnats::internal.c b/databases/gnats/files/patch-gnats::internal.c
new file mode 100644
index 000000000000..82fda8996d0e
--- /dev/null
+++ b/databases/gnats/files/patch-gnats::internal.c
@@ -0,0 +1,11 @@
+--- gnats/internal.c.orig Wed Mar 3 09:18:53 1999
++++ gnats/internal.c Sat Jun 14 14:09:45 2003
+@@ -238,7 +238,7 @@
+ struct stat buf;
+ int count;
+
+- sprintf (path, "%s/gnats-adm/gnats.lock", gnats_root);
++ snprintf (path, PATH_MAX-1, "%s/gnats-adm/gnats.lock", gnats_root);
+
+ #define MAXWAIT 10
+ #define GRANULARITY 1