import openjpeg2-2.3.1-4.el8

This commit is contained in:
CentOS Sources 2020-01-21 11:13:50 -05:00 committed by Stepan Oksanichenko
parent 31bfb7048f
commit 85e1e1b6ea
3 changed files with 64 additions and 17 deletions

View File

@ -0,0 +1,49 @@
diff --git a/src/bin/jp2/convertpng.c b/src/bin/jp2/convertpng.c
index 44d985f..b85e126 100644
--- a/src/bin/jp2/convertpng.c
+++ b/src/bin/jp2/convertpng.c
@@ -75,10 +75,10 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params)
png_uint_32 width, height = 0U;
int color_type;
FILE *reader = NULL;
- OPJ_BYTE** rows = NULL;
- OPJ_INT32* row32s = NULL;
+ OPJ_BYTE** volatile rows = NULL;
+ OPJ_INT32* volatile row32s = NULL;
/* j2k: */
- opj_image_t *image = NULL;
+ opj_image_t* volatile image = NULL;
opj_image_cmptparm_t cmptparm[4];
OPJ_UINT32 nr_comp;
OPJ_BYTE sigbuf[8];
diff --git a/src/bin/jp2/converttif.c b/src/bin/jp2/converttif.c
index 6714d69..625c407 100644
--- a/src/bin/jp2/converttif.c
+++ b/src/bin/jp2/converttif.c
@@ -714,7 +714,7 @@ int imagetotif(opj_image_t * image, const char *outfile)
TIFFClose(tif);
return 1;
}
- rowStride = (int64_t)((width * numcomps * bps + 7U) / 8U);
+ rowStride = ((int64_t)width * numcomps * bps + 7U) / 8U;
if (rowStride != strip_size) {
fprintf(stderr, "Invalid TIFF strip size\n");
TIFFClose(tif);
@@ -1277,8 +1277,6 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &tiSpp);
TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &tiPhoto);
TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &tiPC);
- w = (int)tiWidth;
- h = (int)tiHeight;
if (tiSpp == 0 || tiSpp > 4) { /* should be 1 ... 4 */
fprintf(stderr, "tiftoimage: Bad value for samples per pixel == %d.\n"
@@ -1445,7 +1443,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters)
return NULL;
}
- rowStride = (int64_t)((tiWidth * tiSpp * tiBps + 7U) / 8U);
+ rowStride = ((int64_t)tiWidth * tiSpp * tiBps + 7U) / 8U;
buffer32s = (OPJ_INT32 *)malloc(sizeof(OPJ_INT32) * tiWidth * tiSpp);
if (buffer32s == NULL) {
_TIFFfree(buf);

View File

@ -1,12 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ea2424..af0e1cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,7 +278,6 @@ if(BUILD_CODEC OR BUILD_MJ2)
# OFF: It will only build 3rd party libs if they are not found on the system
# ON: 3rd party libs will ALWAYS be build, and used
option(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF)
- add_subdirectory(thirdparty)
add_subdirectory(src/bin)
endif ()
add_subdirectory(wrapping)

View File

@ -5,7 +5,7 @@
Name: openjpeg2 Name: openjpeg2
Version: 2.3.1 Version: 2.3.1
Release: 1%{?dist} Release: 4%{?dist}
Summary: C-Library for JPEG 2000 Summary: C-Library for JPEG 2000
# windirent.h is MIT, the rest is BSD # windirent.h is MIT, the rest is BSD
@ -17,10 +17,11 @@ Source0: https://github.com/uclouvain/openjpeg/archive/v%{version}/openjp
Source1: data.tar.xz Source1: data.tar.xz
%endif %endif
# Remove bundled libraries
Patch0: openjpeg2_remove-thirdparty.patch
# Rename tool names to avoid conflicts with openjpeg-1.x # Rename tool names to avoid conflicts with openjpeg-1.x
Patch1: openjpeg2_opj2.patch Patch0: openjpeg2_opj2.patch
# Fix Coverity issues
Patch1: openjpeg2_coverity.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc BuildRequires: gcc
@ -202,7 +203,7 @@ OpenJPEG2 JP3D module command line tools
%autosetup -p1 -n openjpeg-%{version} %{?runcheck:-a 1} %autosetup -p1 -n openjpeg-%{version} %{?runcheck:-a 1}
# Remove all third party libraries just to be sure # Remove all third party libraries just to be sure
rm -rf thirdparty find thirdparty/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;
%build %build
@ -325,6 +326,15 @@ make test -C %{_target_platform}
%changelog %changelog
* Wed Dec 04 2019 Nikola Forró <nforro@redhat.com> - 2.3.1-4
- Add upstream test suite and enable it in gating
* Fri Nov 29 2019 Nikola Forró <nforro@redhat.com> - 2.3.1-3
- Fix Coverity issues
* Wed Nov 20 2019 Nikola Forró <nforro@redhat.com> - 2.3.1-2
- Fix unbundling third party libraries (#1757823)
* Fri May 31 2019 Nikola Forró <nforro@redhat.com> - 2.3.1-1 * Fri May 31 2019 Nikola Forró <nforro@redhat.com> - 2.3.1-1
- Rebase to 2.3.1 (#1704255) - Rebase to 2.3.1 (#1704255)