- Update to 2.1.1

- Add LICENSE_FILE
- Add upstream patches [1]

Obtained from:	a4e93c3b0a [1]
		c16c91797f [1]
		55dbf8acff [1]
Security:	a233d51f-5d4c-11e5-9ad8-14dae9d210b8
MFH:		2015Q3
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2015-09-23 20:18:05 +00:00
parent 0826dbc417
commit 79eb067db0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397658
3 changed files with 65 additions and 5 deletions

View File

@ -2,14 +2,14 @@
# $FreeBSD$
PORTNAME= openjpeg
PORTVERSION= 2.1.0
PORTREVISION= 1
PORTVERSION= 2.1.1
CATEGORIES= graphics
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Open-source JPEG 2000 codec
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= liblcms2.so:${PORTSDIR}/graphics/lcms2 \
libpng.so:${PORTSDIR}/graphics/png \
@ -21,7 +21,8 @@ USES= cmake cpe pkgconfig
PLIST_SUB= VER=${PORTVERSION:R}
GH_ACCOUNT= uclouvain
GH_TAGNAME= version.${PORTVERSION:R}
#GH_TAGNAME= version.${PORTVERSION:R}
GH_TAGNAME= 9c911c0
USE_GITHUB= yes
post-patch:

View File

@ -1,2 +1,2 @@
SHA256 (uclouvain-openjpeg-2.1.0-version.2.1_GH0.tar.gz) = 4afc996cd5e0d16360d71c58216950bcb4ce29a3272360eb29cadb1c8bce4efc
SIZE (uclouvain-openjpeg-2.1.0-version.2.1_GH0.tar.gz) = 1775088
SHA256 (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = cb0f08de689cfc70604876aaa68c11546db508d0d711e48d946bd2b0a154f50d
SIZE (uclouvain-openjpeg-2.1.1-9c911c0_GH0.tar.gz) = 1942736

View File

@ -0,0 +1,59 @@
Obtained from: https://github.com/uclouvain/openjpeg/commit/a4e93c3b0af1c42770206b5d25014a05a60ec8f5
https://github.com/uclouvain/openjpeg/commit/c16c91797f4b15eb55d56f85fd497d588331e71f
https://github.com/uclouvain/openjpeg/commit/55dbf8acff9afab1591b6a094b744d8426a32dd4
--- src/lib/openjp2/j2k.c.orig 2015-09-16 18:49:45 UTC
+++ src/lib/openjp2/j2k.c
@@ -8603,8 +8603,10 @@ static opj_codestream_index_t* opj_j2k_c
cstr_index->marknum = 0;
cstr_index->marker = (opj_marker_info_t*)
opj_calloc(cstr_index->maxmarknum, sizeof(opj_marker_info_t));
- if (!cstr_index-> marker)
+ if (!cstr_index-> marker) {
+ opj_free(cstr_index);
return NULL;
+ }
cstr_index->tile_index = NULL;
@@ -9668,14 +9670,14 @@ static OPJ_BOOL opj_j2k_decode_one_tile
* so move to the last SOT read */
if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){
opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
- opj_free(l_current_data);
+ opj_free(l_current_data);
return OPJ_FALSE;
}
}
else{
if ( !(opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) ) {
opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
- opj_free(l_current_data);
+ opj_free(l_current_data);
return OPJ_FALSE;
}
}
@@ -9733,6 +9735,7 @@ static OPJ_BOOL opj_j2k_decode_one_tile
/* move into the codestream to the the first SOT (FIXME or not move?)*/
if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) {
opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
+ opj_free(l_current_data);
return OPJ_FALSE;
}
break;
@@ -9998,11 +10001,15 @@ OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2
/* now copy this data into the tile component */
if (! opj_tcd_copy_tile_data(p_j2k->m_tcd,l_current_data,l_current_tile_size)) {
opj_event_msg(p_manager, EVT_ERROR, "Size mismatch between tile data and sent data." );
+ opj_free(l_current_data);
return OPJ_FALSE;
}
}
if (! opj_j2k_post_write_tile (p_j2k,p_stream,p_manager)) {
+ if (l_current_data) {
+ opj_free(l_current_data);
+ }
return OPJ_FALSE;
}
}