From 4f94470151e743e770d28113e981f4d83a94445f Mon Sep 17 00:00:00 2001 From: "dengke.du@windriver.com" Date: Fri, 1 Sep 2017 05:31:33 -0400 Subject: openjpeg: upgrade to 2.2.0 Signed-off-by: Dengke Du Signed-off-by: Martin Jansa --- ...fo_header-reject-bmp-files-with-biBitCoun.patch | 31 ++++++++++++++++++++++ .../recipes-graphics/openjpeg/openjpeg_2.1.1.bb | 19 ------------- .../recipes-graphics/openjpeg/openjpeg_2.2.0.bb | 21 +++++++++++++++ 3 files changed, 52 insertions(+), 19 deletions(-) create mode 100644 meta-oe/recipes-graphics/openjpeg/files/0001-bmp_read_info_header-reject-bmp-files-with-biBitCoun.patch delete mode 100644 meta-oe/recipes-graphics/openjpeg/openjpeg_2.1.1.bb create mode 100644 meta-oe/recipes-graphics/openjpeg/openjpeg_2.2.0.bb diff --git a/meta-oe/recipes-graphics/openjpeg/files/0001-bmp_read_info_header-reject-bmp-files-with-biBitCoun.patch b/meta-oe/recipes-graphics/openjpeg/files/0001-bmp_read_info_header-reject-bmp-files-with-biBitCoun.patch new file mode 100644 index 0000000000..866d9aa41b --- /dev/null +++ b/meta-oe/recipes-graphics/openjpeg/files/0001-bmp_read_info_header-reject-bmp-files-with-biBitCoun.patch @@ -0,0 +1,31 @@ +From 226f07e4b49c2757b181c62e6841000c512054e3 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Mon, 14 Aug 2017 17:26:58 +0200 +Subject: [PATCH] bmp_read_info_header(): reject bmp files with biBitCount == 0 + (#983) + +Upstream-Status: Backport [https://github.com/uclouvain/openjpeg/commit/baf0c1ad4572daa89caa3b12985bdd93530f0dd7] +CVE: CVE-2017-12982 +Signed-off-by: Dengke Du +--- + src/bin/jp2/convertbmp.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c +index b49e7a0..2715fdf 100644 +--- a/src/bin/jp2/convertbmp.c ++++ b/src/bin/jp2/convertbmp.c +@@ -392,6 +392,10 @@ static OPJ_BOOL bmp_read_info_header(FILE* IN, OPJ_BITMAPINFOHEADER* header) + + header->biBitCount = (OPJ_UINT16)getc(IN); + header->biBitCount |= (OPJ_UINT16)((OPJ_UINT32)getc(IN) << 8); ++ if (header->biBitCount == 0) { ++ fprintf(stderr, "Error, invalid biBitCount %d\n", 0); ++ return OPJ_FALSE; ++ } + + if (header->biSize >= 40U) { + header->biCompression = (OPJ_UINT32)getc(IN); +-- +2.8.1 + diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg_2.1.1.bb b/meta-oe/recipes-graphics/openjpeg/openjpeg_2.1.1.bb deleted file mode 100644 index fa4f7964a2..0000000000 --- a/meta-oe/recipes-graphics/openjpeg/openjpeg_2.1.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "OpenJPEG library is an open-source JPEG 2000 codec" -HOMEPAGE = "http://www.openjpeg.org" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c648878b4840d7babaade1303e7f108c" - -SRC_URI = "https://github.com/uclouvain/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz" -SRC_URI[md5sum] = "0cc4b2aee0a9b6e9e21b7abcd201a3ec" -SRC_URI[sha256sum] = "82c27f47fc7219e2ed5537ac69545bf15ed8c6ba8e6e1e529f89f7356506dbaa" - -inherit cmake - -DEPENDS = "libpng tiff lcms zlib" - -# standard path for *.cmake -EXTRA_OECMAKE += "-DOPENJPEG_INSTALL_PACKAGE_DIR=${baselib}/cmake \ - -DOPENJPEG_INSTALL_LIB_DIR:PATH=${libdir}" - -FILES_${PN}-dev += "${libdir}/cmake/*.cmake" diff --git a/meta-oe/recipes-graphics/openjpeg/openjpeg_2.2.0.bb b/meta-oe/recipes-graphics/openjpeg/openjpeg_2.2.0.bb new file mode 100644 index 0000000000..4ef1c408fd --- /dev/null +++ b/meta-oe/recipes-graphics/openjpeg/openjpeg_2.2.0.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "OpenJPEG library is an open-source JPEG 2000 codec" +HOMEPAGE = "http://www.openjpeg.org" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c648878b4840d7babaade1303e7f108c" + +SRC_URI = "https://github.com/uclouvain/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ + file://0001-bmp_read_info_header-reject-bmp-files-with-biBitCoun.patch \ + " +SRC_URI[md5sum] = "269bb0b175476f3addcc0d03bd9a97b6" +SRC_URI[sha256sum] = "6fddbce5a618e910e03ad00d66e7fcd09cc6ee307ce69932666d54c73b7c6e7b" + +inherit cmake + +DEPENDS = "libpng tiff lcms zlib" + +# standard path for *.cmake +EXTRA_OECMAKE += "-DOPENJPEG_INSTALL_PACKAGE_DIR=${baselib}/cmake \ + -DOPENJPEG_INSTALL_LIB_DIR:PATH=${libdir}" + +FILES_${PN}-dev += "${libdir}/cmake/*.cmake" -- cgit 1.2.3-korg