diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2013-05-17 13:13:32 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2013-05-17 13:13:32 +0800 |
commit | 90481315ee6cfc8e7b6c9448b04425ff945f1e10 (patch) | |
tree | 50f8115f17e706f01c8bd95f475992b2f8339bec /ports-mgmt/pkg | |
parent | 82236c8606663e833cccc76e8e4e8a51077bf266 (diff) | |
download | freebsd-ports-gnome-90481315ee6cfc8e7b6c9448b04425ff945f1e10.tar.gz freebsd-ports-gnome-90481315ee6cfc8e7b6c9448b04425ff945f1e10.tar.zst freebsd-ports-gnome-90481315ee6cfc8e7b6c9448b04425ff945f1e10.zip |
- Fix crash while packaging netbeans
Reported by: many
Reviewed by: bapt
Diffstat (limited to 'ports-mgmt/pkg')
-rw-r--r-- | ports-mgmt/pkg/Makefile | 1 | ||||
-rw-r--r-- | ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/ports-mgmt/pkg/Makefile b/ports-mgmt/pkg/Makefile index 11c9268fde26..69a3416cb5e8 100644 --- a/ports-mgmt/pkg/Makefile +++ b/ports-mgmt/pkg/Makefile @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.0.12 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= LOCAL/portmgr \ http://files.etoilebsd.net/pkg/ \ diff --git a/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c new file mode 100644 index 000000000000..a416d9e4db13 --- /dev/null +++ b/ports-mgmt/pkg/files/patch-libpkg__pkg_elf.c @@ -0,0 +1,26 @@ +--- ./libpkg/pkg_elf.c.orig 2013-05-16 23:38:38.020628709 -0500 ++++ ./libpkg/pkg_elf.c 2013-05-16 23:57:33.346627390 -0500 +@@ -258,7 +258,10 @@ + } + + if (note != NULL) { +- data = elf_getdata(note, NULL); ++ if ((data = elf_getdata(note, NULL)) == NULL) { ++ ret = EPKG_END; /* Some error occurred, ignore this file */ ++ goto cleanup; ++ } + osname = (const char *) data->d_buf + sizeof(Elf_Note); + if (strncasecmp(osname, "freebsd", sizeof("freebsd")) != 0 && + strncasecmp(osname, "dragonfly", sizeof("dragonfly")) != 0) { +@@ -272,7 +275,10 @@ + } + } + +- data = elf_getdata(dynamic, NULL); ++ if ((data = elf_getdata(dynamic, NULL)) == NULL) { ++ ret = EPKG_END; /* Some error occurred, ignore this file */ ++ goto cleanup; ++ } + + /* First, scan through the data from the .dynamic section to + find any RPATH or RUNPATH settings. These are colon |