aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2019-04-05 22:43:05 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2019-04-05 22:43:05 +0000
commitebd02f601e9d8e0afd680bfe7aa58d5dbd0cc2ca (patch)
treea5eeb0f60538bb8ec71932ecf9787c81d967f018 /graphics
parent9c8fe3089d24f7c3ea6f50a55fa70c1ba93ccd24 (diff)
Notes
Diffstat (limited to 'graphics')
-rw-r--r--graphics/openjpeg/Makefile3
-rw-r--r--graphics/openjpeg/distinfo6
-rw-r--r--graphics/openjpeg/files/patch-src-bin-jp2-convertbmp.c98
-rw-r--r--graphics/openjpeg/files/patch-src-lib-openjp2-t1.c24
-rw-r--r--graphics/openjpeg/files/patch-src_bin_jp3d_convert.c11
-rw-r--r--graphics/openjpeg/files/patch-src_bin_jpwl_convert.c11
6 files changed, 4 insertions, 149 deletions
diff --git a/graphics/openjpeg/Makefile b/graphics/openjpeg/Makefile
index 3cba946ea485..50fd9bcdffc9 100644
--- a/graphics/openjpeg/Makefile
+++ b/graphics/openjpeg/Makefile
@@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= openjpeg
-PORTVERSION= 2.3.0
+PORTVERSION= 2.3.1
DISTVERSIONPREFIX= v
-PORTREVISION= 4
CATEGORIES= graphics
MAINTAINER= sunpoet@FreeBSD.org
diff --git a/graphics/openjpeg/distinfo b/graphics/openjpeg/distinfo
index 1b6a6b8be5e4..06740a1b8aa7 100644
--- a/graphics/openjpeg/distinfo
+++ b/graphics/openjpeg/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1507191000
-SHA256 (uclouvain-openjpeg-v2.3.0_GH0.tar.gz) = 3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a
-SIZE (uclouvain-openjpeg-v2.3.0_GH0.tar.gz) = 2207329
+TIMESTAMP = 1554485936
+SHA256 (uclouvain-openjpeg-v2.3.1_GH0.tar.gz) = 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9
+SIZE (uclouvain-openjpeg-v2.3.1_GH0.tar.gz) = 2214401
diff --git a/graphics/openjpeg/files/patch-src-bin-jp2-convertbmp.c b/graphics/openjpeg/files/patch-src-bin-jp2-convertbmp.c
deleted file mode 100644
index be0d59040914..000000000000
--- a/graphics/openjpeg/files/patch-src-bin-jp2-convertbmp.c
+++ /dev/null
@@ -1,98 +0,0 @@
-Fix CVE-2018-5785 and CVE-2018-6616
-
-Obtained from: https://github.com/uclouvain/openjpeg/commit/ca16fe55014c57090dd97369256c7657aeb25975
- https://github.com/uclouvain/openjpeg/commit/8ee335227bbcaf1614124046aa25e53d67b11ec3
-
---- src/bin/jp2/convertbmp.c.orig 2017-10-04 22:23:14 UTC
-+++ src/bin/jp2/convertbmp.c
-@@ -435,16 +435,31 @@ static OPJ_BOOL bmp_read_info_header(FIL
- header->biRedMask |= (OPJ_UINT32)getc(IN) << 16;
- header->biRedMask |= (OPJ_UINT32)getc(IN) << 24;
-
-+ if (!header->biRedMask) {
-+ fprintf(stderr, "Error, invalid red mask value %d\n", header->biRedMask);
-+ return OPJ_FALSE;
-+ }
-+
- header->biGreenMask = (OPJ_UINT32)getc(IN);
- header->biGreenMask |= (OPJ_UINT32)getc(IN) << 8;
- header->biGreenMask |= (OPJ_UINT32)getc(IN) << 16;
- header->biGreenMask |= (OPJ_UINT32)getc(IN) << 24;
-
-+ if (!header->biGreenMask) {
-+ fprintf(stderr, "Error, invalid green mask value %d\n", header->biGreenMask);
-+ return OPJ_FALSE;
-+ }
-+
- header->biBlueMask = (OPJ_UINT32)getc(IN);
- header->biBlueMask |= (OPJ_UINT32)getc(IN) << 8;
- header->biBlueMask |= (OPJ_UINT32)getc(IN) << 16;
- header->biBlueMask |= (OPJ_UINT32)getc(IN) << 24;
-
-+ if (!header->biBlueMask) {
-+ fprintf(stderr, "Error, invalid blue mask value %d\n", header->biBlueMask);
-+ return OPJ_FALSE;
-+ }
-+
- header->biAlphaMask = (OPJ_UINT32)getc(IN);
- header->biAlphaMask |= (OPJ_UINT32)getc(IN) << 8;
- header->biAlphaMask |= (OPJ_UINT32)getc(IN) << 16;
-@@ -519,14 +534,14 @@ static OPJ_BOOL bmp_read_raw_data(FILE*
- static OPJ_BOOL bmp_read_rle8_data(FILE* IN, OPJ_UINT8* pData,
- OPJ_UINT32 stride, OPJ_UINT32 width, OPJ_UINT32 height)
- {
-- OPJ_UINT32 x, y;
-+ OPJ_UINT32 x, y, written;
- OPJ_UINT8 *pix;
- const OPJ_UINT8 *beyond;
-
- beyond = pData + stride * height;
- pix = pData;
-
-- x = y = 0U;
-+ x = y = written = 0U;
- while (y < height) {
- int c = getc(IN);
- if (c == EOF) {
-@@ -546,6 +561,7 @@ static OPJ_BOOL bmp_read_rle8_data(FILE*
- for (j = 0; (j < c) && (x < width) &&
- ((OPJ_SIZE_T)pix < (OPJ_SIZE_T)beyond); j++, x++, pix++) {
- *pix = c1;
-+ written++;
- }
- } else {
- c = getc(IN);
-@@ -583,6 +599,7 @@ static OPJ_BOOL bmp_read_rle8_data(FILE*
- }
- c1 = (OPJ_UINT8)c1_int;
- *pix = c1;
-+ written++;
- }
- if ((OPJ_UINT32)c & 1U) { /* skip padding byte */
- c = getc(IN);
-@@ -593,6 +610,12 @@ static OPJ_BOOL bmp_read_rle8_data(FILE*
- }
- }
- }/* while() */
-+
-+ if (written != width * height) {
-+ fprintf(stderr, "warning, image's actual size does not match advertized one\n");
-+ return OPJ_FALSE;
-+ }
-+
- return OPJ_TRUE;
- }
-
-@@ -831,6 +854,12 @@ opj_image_t* bmptoimage(const char *file
- bmpmask32toimage(pData, stride, image, 0x00FF0000U, 0x0000FF00U, 0x000000FFU,
- 0x00000000U);
- } else if (Info_h.biBitCount == 32 && Info_h.biCompression == 3) { /* bitmask */
-+ if ((Info_h.biRedMask == 0U) && (Info_h.biGreenMask == 0U) &&
-+ (Info_h.biBlueMask == 0U)) {
-+ Info_h.biRedMask = 0x00FF0000U;
-+ Info_h.biGreenMask = 0x0000FF00U;
-+ Info_h.biBlueMask = 0x000000FFU;
-+ }
- bmpmask32toimage(pData, stride, image, Info_h.biRedMask, Info_h.biGreenMask,
- Info_h.biBlueMask, Info_h.biAlphaMask);
- } else if (Info_h.biBitCount == 16 && Info_h.biCompression == 0) { /* RGBX */
diff --git a/graphics/openjpeg/files/patch-src-lib-openjp2-t1.c b/graphics/openjpeg/files/patch-src-lib-openjp2-t1.c
deleted file mode 100644
index 77d16c031d6a..000000000000
--- a/graphics/openjpeg/files/patch-src-lib-openjp2-t1.c
+++ /dev/null
@@ -1,24 +0,0 @@
-Obtained from: https://github.com/uclouvain/openjpeg/commit/d6b8aed5612e6be6d3a4053867fbd2ae0cb7c8af
-
---- src/lib/openjp2/t1.c.orig 2017-10-04 22:23:14 UTC
-+++ src/lib/openjp2/t1.c
-@@ -2168,9 +2168,18 @@ OPJ_BOOL opj_t1_encode_cblks(opj_t1_t *t
- t1->data = tiledp;
- t1->data_stride = tile_w;
- if (tccp->qmfbid == 1) {
-+ /* Do multiplication on unsigned type, even if the
-+ * underlying type is signed, to avoid potential
-+ * int overflow on large value (the output will be
-+ * incorrect in such situation, but whatever...)
-+ * This assumes complement-to-2 signed integer
-+ * representation
-+ * Fixes https://github.com/uclouvain/openjpeg/issues/1053
-+ */
-+ OPJ_UINT32* OPJ_RESTRICT tiledp_u = (OPJ_UINT32*) tiledp;
- for (j = 0; j < cblk_h; ++j) {
- for (i = 0; i < cblk_w; ++i) {
-- tiledp[tileIndex] *= (1 << T1_NMSEDEC_FRACBITS);
-+ tiledp_u[tileIndex] <<= T1_NMSEDEC_FRACBITS;
- tileIndex++;
- }
- tileIndex += tileLineAdvance;
diff --git a/graphics/openjpeg/files/patch-src_bin_jp3d_convert.c b/graphics/openjpeg/files/patch-src_bin_jp3d_convert.c
deleted file mode 100644
index c086f0452818..000000000000
--- a/graphics/openjpeg/files/patch-src_bin_jp3d_convert.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/bin/jp3d/convert.c.orig 2018-08-02 17:40:37 UTC
-+++ src/bin/jp3d/convert.c
-@@ -297,7 +297,7 @@ opj_volume_t* pgxtovolume(char *relpath,
- fprintf(stdout, "[INFO] Loading %s \n", pgxfiles[pos]);
-
- fseek(f, 0, SEEK_SET);
-- fscanf(f, "PG%[ \t]%c%c%[ \t+-]%d%[ \t]%d%[ \t]%d", temp, &endian1, &endian2,
-+ fscanf(f, "PG%31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31[ \t]%d", temp, &endian1, &endian2
- signtmp, &prec, temp, &w, temp, &h);
-
- i = 0;
diff --git a/graphics/openjpeg/files/patch-src_bin_jpwl_convert.c b/graphics/openjpeg/files/patch-src_bin_jpwl_convert.c
deleted file mode 100644
index aea743e019c8..000000000000
--- a/graphics/openjpeg/files/patch-src_bin_jpwl_convert.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/bin/jpwl/convert.c.orig 2018-08-02 17:47:37 UTC
-+++ src/bin/jpwl/convert.c
-@@ -1348,7 +1348,7 @@ opj_image_t* pgxtoimage(const char *file
- }
-
- fseek(f, 0, SEEK_SET);
-- if (fscanf(f, "PG%[ \t]%c%c%[ \t+-]%d%[ \t]%d%[ \t]%d", temp, &endian1,
-+ if (fscanf(f, "PG%31[ \t]%c%c%31[ \t+-]%d%31[ \t]%d%31[ \t]%d", temp, &endian1,
- &endian2, signtmp, &prec, temp, &w, temp, &h) != 9) {
- fprintf(stderr,
- "ERROR: Failed to read the right number of element from the fscanf() function!\n");