1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Fix segmentation faults caused by missing libc function prototypes

Returned pointers could be truncated to (potentially smaller) integers

Reported by:	will (with detailed analysis)
This commit is contained in:
Johan van Selst 2011-09-15 16:51:00 +00:00
parent 902fd0b56f
commit b2f06fb4c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281809
3 changed files with 17 additions and 1 deletions

View File

@ -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/

View File

@ -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>

View File

@ -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---------*/