aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2013-09-05 11:39:57 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2013-09-05 11:39:57 +0000
commit6393831e4daa89a07ed73ecced826787cc53a4c8 (patch)
tree5bf145ba5ef904677293b633281bd41f14a6990a /ports-mgmt
parent9c7bb68f0bb7ce9d5ddd33703fd305b8e4963c15 (diff)
downloadports-6393831e4daa89a07ed73ecced826787cc53a4c8.tar.gz
ports-6393831e4daa89a07ed73ecced826787cc53a4c8.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/pkg/Makefile2
-rw-r--r--ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c21
2 files changed, 16 insertions, 7 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile
index 1903d91f3a3b..defedc885e3d 100644
--- a/ports-mgmt/pkg/Makefile
+++ b/ports-mgmt/pkg/Makefile
@@ -2,7 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.1.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= ports-mgmt
MASTER_SITES= http://files.etoilebsd.net/pkg/ \
http://mirror.shatow.net/freebsd/${PORTNAME}/ \
diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
index 23c115212cfc..220f88d68b7c 100644
--- a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
+++ b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c
@@ -1,8 +1,17 @@
-diff --git libpkg/pkg_elf.c libpkg/pkg_elf.c
-index 8ac65ba..2abfc0e 100644
---- libpkg/pkg_elf.c
-+++ libpkg/pkg_elf.c
-@@ -484,7 +484,7 @@ pkg_get_myarch(char *dest, size_t sz)
+--- ./libpkg/pkg_elf.c.orig 2013-07-06 05:48:19.000000000 -0500
++++ ./libpkg/pkg_elf.c 2013-09-05 06:33:00.416129335 -0500
+@@ -271,6 +271,10 @@
+ ret = EPKG_END; /* Some error occurred, ignore this file */
+ goto cleanup;
+ }
++ if (data->d_buf == NULL) {
++ ret = EPKG_END; /* No osname available */
++ goto cleanup;
++ }
+ osname = (const char *) data->d_buf + sizeof(Elf_Note);
+ if (strncasecmp(osname, "freebsd", sizeof("freebsd")) != 0 &&
+ strncasecmp(osname, "dragonfly", sizeof("dragonfly")) != 0) {
+@@ -484,7 +488,7 @@
uint32_t version = 0;
int ret = EPKG_OK;
int i;
@@ -11,7 +20,7 @@ index 8ac65ba..2abfc0e 100644
if (elf_version(EV_CURRENT) == EV_NONE) {
pkg_emit_error("ELF library initialization failed: %s",
-@@ -569,10 +569,28 @@ pkg_get_myarch(char *dest, size_t sz)
+@@ -569,10 +573,28 @@
endian_corres_str = elf_corres_to_string(endian_corres,
(int)elfhdr.e_ident[EI_DATA]);