aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjohans <johans@FreeBSD.org>2011-09-16 00:51:00 +0800
committerjohans <johans@FreeBSD.org>2011-09-16 00:51:00 +0800
commitbf3150450d21256e043cd103348aaf6f6d4948e1 (patch)
tree63df76d92673208f6dc2b07e6be6cf424700f9a2
parent9053b52db8c564a09b64415508fd4a2836f21226 (diff)
downloadfreebsd-ports-gnome-bf3150450d21256e043cd103348aaf6f6d4948e1.tar.gz
freebsd-ports-gnome-bf3150450d21256e043cd103348aaf6f6d4948e1.tar.zst
freebsd-ports-gnome-bf3150450d21256e043cd103348aaf6f6d4948e1.zip
- Fix segmentation faults caused by missing libc function prototypes
Returned pointers could be truncated to (potentially smaller) integers Reported by: will (with detailed analysis)
-rw-r--r--archivers/rpm4/Makefile1
-rw-r--r--archivers/rpm4/files/patch-system.h7
-rw-r--r--archivers/rpm4/files/patch-tools_javadeps.c10
3 files changed, 17 insertions, 1 deletions
diff --git a/archivers/rpm4/Makefile b/archivers/rpm4/Makefile
index 290b07f9c7c9..252c50020e6b 100644
--- a/archivers/rpm4/Makefile
+++ b/archivers/rpm4/Makefile
@@ -6,6 +6,7 @@
PORTNAME= rpm
PORTVERSION= 4.9.1.1
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= http://rpm.org/releases/rpm-${PORTVERSION:R:R}.x/ \
ftp://ftp.mirrorservice.org/sites/ftp.rpm.org/pub/rpm/dist/rpm-${PORTVERSION:E}.x/
diff --git a/archivers/rpm4/files/patch-system.h b/archivers/rpm4/files/patch-system.h
index 53fbda2846e3..087025591e2a 100644
--- a/archivers/rpm4/files/patch-system.h
+++ b/archivers/rpm4/files/patch-system.h
@@ -1,10 +1,15 @@
--- system.h.orig 2011-06-10 15:27:05.000000000 +0200
+++ system.h 2011-06-10 15:27:09.000000000 +0200
-@@ -39,6 +39,8 @@ char * stpncpy(char * dest, const char *
+@@ -39,6 +39,13 @@ char * stpncpy(char * dest, const char *
#define getenv(_s) __secure_getenv(_s)
#endif
++/* Add includes for missing libc prototypes */
++#include <ctype.h>
++#include <string.h>
++#include <libgen.h>
+#include <sys/wait.h>
++#include <netinet/in.h>
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
diff --git a/archivers/rpm4/files/patch-tools_javadeps.c b/archivers/rpm4/files/patch-tools_javadeps.c
new file mode 100644
index 000000000000..77a06f2e7d78
--- /dev/null
+++ b/archivers/rpm4/files/patch-tools_javadeps.c
@@ -0,0 +1,10 @@
+--- tools/javadeps.c.orig 2011-09-14 23:09:48.000000000 +0200
++++ tools/javadeps.c 2011-09-14 23:09:50.000000000 +0200
+@@ -57,6 +57,7 @@
+ #include <netdb.h>
+ #include <rpm/rpmutil.h>
+ #include <ctype.h>
++#include <netinet/in.h>
+ #include "debug.h"
+
+ /*---------typedefs---------*/