aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-18 10:24:17 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-18 10:24:17 +0000
commitd69f651532084cd3842feaf6042650f72ab30ee4 (patch)
tree403a580c663d05c6f30249106b32fe0eed7253ef /main
parent63e7ddbbfcf79a77eb83afd166688524f4ed168c (diff)
downloadaports-d69f651532084cd3842feaf6042650f72ab30ee4.tar.bz2
aports-d69f651532084cd3842feaf6042650f72ab30ee4.tar.xz
main/openjpeg: upgrade to 2.1.1, added maintainer
Diffstat (limited to 'main')
-rw-r--r--main/openjpeg/APKBUILD38
-rw-r--r--main/openjpeg/CVE-2015-6581.patch44
-rw-r--r--main/openjpeg/fix-use-after-free.patch45
3 files changed, 10 insertions, 117 deletions
diff --git a/main/openjpeg/APKBUILD b/main/openjpeg/APKBUILD
index 9e340a68ed..65453d4fe7 100644
--- a/main/openjpeg/APKBUILD
+++ b/main/openjpeg/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
-# Maintainer:
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openjpeg
-pkgver=2.1.0
-pkgrel=1
+pkgver=2.1.1
+pkgrel=0
pkgdesc="Open-source implementation of JPEG2000 image codec"
url="http://www.openjpeg.org/"
arch="all"
@@ -12,24 +12,12 @@ depends_dev=""
makedepends="$depends_dev libpng-dev tiff-dev lcms-dev doxygen cmake"
install=""
subpackages="$pkgname-dev $pkgname-tools"
-source="http://downloads.sourceforge.net/project/openjpeg.mirror/$pkgver/openjpeg-$pkgver.tar.gz
- CVE-2015-6581.patch
- fix-use-after-free.patch
- "
+source="$pkgname-$pkgver.tar.gz::https://github.com/uclouvain/openjpeg/archive/v$pkgver.tar.gz"
-_builddir="${srcdir}/$pkgname-$pkgver"
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="${srcdir}/$pkgname-$pkgver"
build() {
- cd "$_builddir"
+ cd "$builddir"
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -40,7 +28,7 @@ build() {
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
}
@@ -50,12 +38,6 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
-md5sums="f6419fcc233df84f9a81eb36633c6db6 openjpeg-2.1.0.tar.gz
-c4d44799e0f048d4e8ea63dc66c043c2 CVE-2015-6581.patch
-5dfdfba1783e5f62a4270b0a3681e77f fix-use-after-free.patch"
-sha256sums="1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03 openjpeg-2.1.0.tar.gz
-bb970ede0eeb5b2b849fe4a6ec93114bb8887160fdf06cc77f179866b5fc9ad8 CVE-2015-6581.patch
-fc7205e89cc8221511d8bd056254b56445ff872b3fd217bfb6295f3989b2c9cc fix-use-after-free.patch"
-sha512sums="3da84d7828a82c738f6ea5fe776c989283ba257cc6884aebfc090cee7e33c88471dee1a93f4a87a300b11f43b98f6624b838171f06227add24afcb1d57208df1 openjpeg-2.1.0.tar.gz
-cf6b65b955de0de29af6b6be4d09c172a153f881be07e3e80435fdcdfe3fae07c4e11138ba76fb62f2ec1adb8043d580b4bfcf5e0807e82ec36307b0cb18f67f CVE-2015-6581.patch
-a1cebeb7933bf10b47ebe420b71c0e2a83eb269028cf42aae08eb9b8a36b19df4c94c91ae1ef3d13e0a284f34ac0bd989e56f8071f0c0a3ca0326cc8d2502d91 fix-use-after-free.patch"
+md5sums="0cc4b2aee0a9b6e9e21b7abcd201a3ec openjpeg-2.1.1.tar.gz"
+sha256sums="82c27f47fc7219e2ed5537ac69545bf15ed8c6ba8e6e1e529f89f7356506dbaa openjpeg-2.1.1.tar.gz"
+sha512sums="c7c5cd95a3b8bc643207fecdfbffd45c3d91e48196455ae42061862aebcd558c3e508c39513285b8ebb4f57b7316116d15cc74c0b9cc3e31c2a7b70d3e5e2cdd openjpeg-2.1.1.tar.gz"
diff --git a/main/openjpeg/CVE-2015-6581.patch b/main/openjpeg/CVE-2015-6581.patch
deleted file mode 100644
index e1ff602196..0000000000
--- a/main/openjpeg/CVE-2015-6581.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 Mon Sep 17 00:00:00 2001
-From: Matthieu Darbois <mayeut@users.noreply.github.com>
-Date: Tue, 19 May 2015 21:57:27 +0000
-Subject: [PATCH] [trunk] Correct potential double free on malloc failure in
- opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
-
----
- src/lib/openjp2/j2k.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
-index 8c62a39..cbdd368 100644
---- a/src/lib/openjp2/j2k.c
-+++ b/src/lib/openjp2/j2k.c
-@@ -7365,6 +7365,12 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2
- l_tcp->cod = 0;
- l_tcp->ppt = 0;
- l_tcp->ppt_data = 00;
-+ /* Remove memory not owned by this tile in case of early error return. */
-+ l_tcp->m_mct_decoding_matrix = 00;
-+ l_tcp->m_nb_max_mct_records = 0;
-+ l_tcp->m_mct_records = 00;
-+ l_tcp->m_nb_max_mcc_records = 0;
-+ l_tcp->m_mcc_records = 00;
- /* Reconnect the tile-compo coding parameters pointer to the current tile coding parameters*/
- l_tcp->tccps = l_current_tccp;
-
-@@ -7402,6 +7408,8 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2
-
- ++l_src_mct_rec;
- ++l_dest_mct_rec;
-+ /* Update with each pass to free exactly what has been allocated on early return. */
-+ l_tcp->m_nb_max_mct_records += 1;
- }
-
- /* Get the mcc_record of the dflt_tile_cp and copy them into the current tile cp*/
-@@ -7411,6 +7419,7 @@ static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2
- return OPJ_FALSE;
- }
- memcpy(l_tcp->m_mcc_records,l_default_tcp->m_mcc_records,l_mcc_records_size);
-+ l_tcp->m_nb_max_mcc_records = l_default_tcp->m_nb_max_mcc_records;
-
- /* Copy the mcc record data from dflt_tile_cp to the current tile*/
- l_src_mcc_rec = l_default_tcp->m_mcc_records;
diff --git a/main/openjpeg/fix-use-after-free.patch b/main/openjpeg/fix-use-after-free.patch
deleted file mode 100644
index 6dbffbae30..0000000000
--- a/main/openjpeg/fix-use-after-free.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 940100c28ae28931722290794889cf84a92c5f6f Mon Sep 17 00:00:00 2001
-From: mayeut <mayeut@users.noreply.github.com>
-Date: Sun, 6 Sep 2015 17:24:03 +0200
-Subject: [PATCH] Fix potential use-after-free in opj_j2k_write_mco function
-
-Fixes #563
----
- src/lib/openjp2/j2k.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
-index 19a48f5..d487d89 100644
---- a/src/lib/openjp2/j2k.c
-+++ b/src/lib/openjp2/j2k.c
-@@ -5559,8 +5559,7 @@ static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
- assert(p_stream != 00);
-
- l_tcp =&(p_j2k->m_cp.tcps[p_j2k->m_current_tile_number]);
-- l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;
--
-+
- l_mco_size = 5 + l_tcp->m_nb_mcc_records;
- if (l_mco_size > p_j2k->m_specific_param.m_encoder.m_header_tile_data_size) {
-
-@@ -5575,6 +5574,8 @@ static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
- p_j2k->m_specific_param.m_encoder.m_header_tile_data = new_header_tile_data;
- p_j2k->m_specific_param.m_encoder.m_header_tile_data_size = l_mco_size;
- }
-+ l_current_data = p_j2k->m_specific_param.m_encoder.m_header_tile_data;
-+
-
- opj_write_bytes(l_current_data,J2K_MS_MCO,2); /* MCO */
- l_current_data += 2;
-@@ -5586,10 +5587,9 @@ static OPJ_BOOL opj_j2k_write_mco( opj_j2k_t *p_j2k,
- ++l_current_data;
-
- l_mcc_record = l_tcp->m_mcc_records;
-- for (i=0;i<l_tcp->m_nb_mcc_records;++i) {
-+ for (i=0;i<l_tcp->m_nb_mcc_records;++i) {
- opj_write_bytes(l_current_data,l_mcc_record->m_index,1);/* Imco -> use the mcc indicated by 1*/
- ++l_current_data;
--
- ++l_mcc_record;
- }
-