glib-2.0: upgrade 2.74.3 -> 2.74.4
PATCH 1/77 glib-2.0: upgrade 2.74.3 -> 2.74.4
---
.../glib-2.0/glib-2.0/fix-errno.patch | 31 +++++++++++++++++++
.../glib-2.0/glib-2.0/relocate-modules.patch | 4 +--
...{glib-2.0_2.74.3.bb => glib-2.0_2.74.4.bb} | 3 +-
3 files changed, 35 insertions(+), 3 deletions(-)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/fix-errno.patch
rename meta/recipes-core/glib-2.0/{glib-2.0_2.74.3.bb => glib-2.0_2.74.4.bb} (95%)meta/recipes-core/glib-2.0/glib-2.0/fix-errno.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 6626765a79f125cf0ec9cdaefa51ceef718d41e7 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro <[email protected]> +Date: Tue, 20 Dec 2022 17:10:41 -0600 +Subject: [PATCH] gthread-posix: need to #include <errno.h> + +a79c6af23eff5ee978db62e048828c9a992a1261 uses errno without the required +header. + + +(cherry picked from commit 03cb4261e00cf505790f4fd4e69f97b2ef4fcccd) + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/6626765a79f125cf0ec9cdaefa51ceef718d41e7] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + glib/gthreadprivate.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/glib/gthreadprivate.h b/glib/gthreadprivate.h +index 6eaf422753..f34368a7c2 100644 +--- a/glib/gthreadprivate.h ++++ b/glib/gthreadprivate.h +@@ -41,6 +41,7 @@ struct _GRealThread + /* system thread implementation (gthread-posix.c, gthread-win32.c) */ + + #if defined(HAVE_FUTEX) || defined(HAVE_FUTEX_TIME64) ++#include <errno.h> + #include <linux/futex.h> + #include <sys/syscall.h> + #include <unistd.h> +-- +GitLab
meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch +2 -2
@@ -1,4 +1,4 @@ -From 0da0b608fdbb144c39225233cbdd89995b76904b Mon Sep 17 00:00:00 2001 +From 2adfd458507c8c832955d6ffb9408d6c574b94f6 Mon Sep 17 00:00:00 2001 From: Ross Burton <[email protected]> Date: Fri, 11 Mar 2016 15:35:55 +0000 Subject: [PATCH] glib-2.0: relocate the GIO module directory for native builds
@@ -19,7 +19,7 @@ Signed-off-by: Jussi Kukkonen <[email protected]> 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gio/giomodule.c b/gio/giomodule.c -index f5dbb4555..c926e77a8 100644 +index f5dbb45..c926e77 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -58,6 +58,8 @@
meta/recipes-core/glib-2.0/glib-2.0_2.74.4.bb renamed from meta/recipes-core/glib-2.0/glib-2.0_2.74.3.bb +2 -1
@@ -18,10 +18,11 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://0001-gio-tests-meson.build-do-not-use-can_run_host_binari.patch \ file://cpp-null.patch \ file://cpp-null2.patch \ + file://fix-errno.patch \ " SRC_URI:append:class-native = " file://relocate-modules.patch" -SRC_URI[sha256sum] = "e9bc41ecd9690d9bc6a970cc7380119b828e5b6a4b16c393c638b3dc2b87cbcb" +SRC_URI[sha256sum] = "0e82da5ea129b4444227c7e4a9e598f7288d1994bf63f129c44b90cfd2432172" # Find any meson cross files in FILESPATH that are relevant for the current # build (using siteinfo) and add them to EXTRA_OEMESON.
Signature · 1 line
2.30.2
PATCH 2/77 jquery: upgrade 3.6.2 -> 3.6.3
---
.../jquery/{jquery_3.6.2.bb => jquery_3.6.3.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-devtools/jquery/{jquery_3.6.2.bb => jquery_3.6.3.bb} (81%)meta/recipes-devtools/jquery/jquery_3.6.3.bb renamed from meta/recipes-devtools/jquery/jquery_3.6.2.bb +3 -3
@@ -13,9 +13,9 @@ SRC_URI = "\ https://code.jquery.com/${BP}.min.map;name=map;subdir=${BP} \ " -SRC_URI[js.sha256sum] = "a649f609466685e49ecacb18c37bcca75fb1cae6f89be7be40ae2c42c92fba8e" -SRC_URI[min.sha256sum] = "da4ad864a87ffcf71c851b5df87f95cb242867f7b711cae4c6133cc9cc0048f0" -SRC_URI[map.sha256sum] = "f46902fc1b81c286e51f4eb4812382ee9eedba0e9fc855e4dc3af59e0c57f404" +SRC_URI[js.sha256sum] = "9d02ee01919145c20b03ee9d3013af7118793dedf5d2c0696a773af90066c953" +SRC_URI[min.sha256sum] = "a6f3f0faea4b3d48e03176341bef0ed3151ffbf226d4c6635f1c6039c0500575" +SRC_URI[map.sha256sum] = "156b740931ade6c1a98d99713eeb186f93847ffc56057e973becab4d037ed53a" UPSTREAM_CHECK_REGEX = "jquery-(?P<pver>\d+(\.\d+)+)\.js"
Signature · 1 line
2.30.2
PATCH 3/77 ethtool: upgrade 6.0 -> 6.1
In reply to Alexander Kanavin---
.../0001-marvell.c-define-_GNU_SOURCE.patch | 26 +++++++++++++++++++
.../ethtool/avoid_parallel_tests.patch | 6 ++---
.../{ethtool_6.0.bb => ethtool_6.1.bb} | 3 ++-
3 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch
rename meta/recipes-extended/ethtool/{ethtool_6.0.bb => ethtool_6.1.bb} (90%)meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 01835ce20f0605f1458365e679137ea65c26aa48 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 2 Jan 2023 13:45:46 +0100 +Subject: [PATCH] marvell.c: define _GNU_SOURCE + +Otherwise u_int32_t is not defined under musl C library. + +Upstream-Status: Submitted [by email to [email protected]] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + marvell.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/marvell.c b/marvell.c +index d3d570e..86f1d46 100644 +--- a/marvell.c ++++ b/marvell.c +@@ -5,6 +5,8 @@ + * Stephen Hemminger <[email protected]> + */ + ++#define _GNU_SOURCE ++ + #include <stdio.h> + + #include "internal.h"
meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch +3 -3
@@ -1,4 +1,4 @@ -From dea90ab711acad251b5d8536c534409979ea8be4 Mon Sep 17 00:00:00 2001 +From 0d066a901292e6a44ff7bc7ee16f99dd2ba4ea15 Mon Sep 17 00:00:00 2001 From: Tudor Florea <[email protected]> Date: Wed, 28 May 2014 18:59:54 +0200 Subject: [PATCH] ethtool: use serial-tests config needed by ptest.
@@ -15,11 +15,11 @@ Upstream-Status: Inappropriate 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 89d0e70..ab2be9c 100644 +index 3eb4e7b..ee5c72f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. - AC_INIT(ethtool, 6.0, [email protected]) + AC_INIT(ethtool, 6.1, [email protected]) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) -AM_INIT_AUTOMAKE([gnu subdir-objects])
meta/recipes-extended/ethtool/ethtool_6.1.bb renamed from meta/recipes-extended/ethtool/ethtool_6.0.bb +2 -1
@@ -9,9 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ file://run-ptest \ file://avoid_parallel_tests.patch \ + file://0001-marvell.c-define-_GNU_SOURCE.patch \ " -SRC_URI[sha256sum] = "f2168e2b45d7e58ed5b76e5533fd607ca0720c9e631f4271bfe997bf72330796" +SRC_URI[sha256sum] = "1d03f1ce324fbd95591191c42ac0c4c9cc721e067b929083a20a46c4b4731436" UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/"
Signature · 1 line
2.30.2
Re: [OE-core] [PATCH 03/77] ethtool: upgrade 6.0 -> 6.1
Quoted 27 lines · Alexander Kanavin
Signed-off-by Alexander Kanavin <[email protected]>--- .../0001-marvell.c-define-_GNU_SOURCE.patch | 26 +++++++++++++++++++ .../ethtool/avoid_parallel_tests.patch | 6 ++--- .../{ethtool_6.0.bb => ethtool_6.1.bb} | 3 ++- 3 files changed, 31 insertions(+), 4 deletions(-)create mode 100644
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patchrename meta/recipes-extended/ethtool/{ethtool_6.0.bb => ethtool_6.1.bb} (90%)meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +12
-0@@ -0,0 +1,26 @@ +From 01835ce20f0605f1458365e679137ea65c26aa48 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 2 Jan 2023 13:45:46 +0100 +Subject: [PATCH] marvell.c: define _GNU_SOURCE + +Otherwise u_int32_t is not defined under musl C library. + +Upstream-Status: Submitted [by email to [email protected]] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + marvell.c | 2 ++ + 1 file changed, 2 insertions(+)
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch line 22
Quoted 10 lines
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +10
-0+ +diff --git a/marvell.c b/marvell.c +index d3d570e..86f1d46 100644 +--- a/marvell.c ++++ b/marvell.c +@@ -5,6 +5,8 @@ + * Stephen Hemminger <[email protected]> + */ + ++#define _GNU_SOURCE
It is probably better to replace u_int32_t with uint32_t from stdint.h instead which is more portable than u_int32_t moreover using _GNU_SOURCE feature macro is also not needed.
Quoted 58 lines
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +4
-0++ + #include <stdio.h> + + #include "internal.h"meta/recipes-extended/ethtool/ethtool/avoid_parallel_tests.patch +3
-3@@ -1,4 +1,4 @@ -From dea90ab711acad251b5d8536c534409979ea8be4 Mon Sep 17 00:00:00 2001 +From 0d066a901292e6a44ff7bc7ee16f99dd2ba4ea15 Mon Sep 17 00:00:00 2001 From: Tudor Florea <[email protected]> Date: Wed, 28 May 2014 18:59:54 +0200 Subject: [PATCH] ethtool: use serial-tests config needed by ptest.@@ -15,11 +15,11 @@ Upstream-Status: Inappropriate 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 89d0e70..ab2be9c 100644 +index 3eb4e7b..ee5c72f 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. - AC_INIT(ethtool, 6.0, [email protected]) + AC_INIT(ethtool, 6.1, [email protected]) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([ethtool.c]) -AM_INIT_AUTOMAKE([gnu subdir-objects])meta/recipes-extended/ethtool/ethtool_6.1.bb renamed from meta/recipes-extended/ethtool/ethtool_6.0.bb +2
-2@@ -9,9 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \ file://run-ptest \ file://avoid_parallel_tests.patch \ + file://0001-marvell.c-define-_GNU_SOURCE.patch \ " -SRC_URI[sha256sum] = "f2168e2b45d7e58ed5b76e5533fd607ca0720c9e631f4271bfe997bf72330796" +SRC_URI[sha256sum] = "1d03f1ce324fbd95591191c42ac0c4c9cc721e067b929083a20a46c4b4731436" UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/software/network/ethtool/" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#175388): https://lists.openembedded.org/g/openembedded-core/message/175388
Mute This Topic: https://lists.openembedded.org/mt/96047870/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 03/77] ethtool: upgrade 6.0 -> 6.1
Quoted 5 lines · Khem Raj
Quoted 5 lines
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +5
-0+diff --git a/marvell.c b/marvell.c +index d3d570e..86f1d46 100644 +--- a/marvell.c ++++ b/marvell.c +@@ -5,6 +5,8 @@
Quoted 8 lines
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch line 22
Quoted 4 lines
meta/recipes-extended/ethtool/ethtool/0001-marvell.c-define-_GNU_SOURCE.patch new file +4
-0+ * Stephen Hemminger <[email protected]> + */ + ++#define _GNU_SOURCEIt is probably better to replace
u_int32_twithuint32_tfromstdint.hinstead which is more portable thanu_int32_tmoreover using_GNU_SOURCEfeature macro is also not needed.
Hello Michal,
this would be perhaps a better fix than the patch I sent.
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [OE-core] [PATCH 03/77] ethtool: upgrade 6.0 -> 6.1
Quoted 7 lines · Alexander Kanavin via lists.openembedded.org
Quoted 3 lines
It is probably better to replace
u_int32_twithuint32_tfromstdint.hinstead which is more portable thanu_int32_tmoreover using_GNU_SOURCEfeature macro is also not needed.Hello Michal,
this would be perhaps a better fix than the patch I sent.
I made a patch for this and sent it.
Alex
PATCH 4/77 nasm: update 2.15.05 -> 2.16.01
In reply to Alexander Kanavinadjust 0002-Add-debug-prefix-map-option.patch to account for
https://github.com/netwide-assembler/nasm/commit/f2a6eb4aaca361c1ebe374bf07765790eecf8869
and add a chunk to it that guarantees source paths not leaking into debug sections that list source filenames.
---
.../nasm/nasm/0001-stdlib-Add-strlcat.patch | 18 ++---
.../0002-Add-debug-prefix-map-option.patch | 74 +++++++++++++------
.../nasm/{nasm_2.15.05.bb => nasm_2.16.01.bb} | 2 +-
3 files changed, 63 insertions(+), 31 deletions(-)
rename meta/recipes-devtools/nasm/{nasm_2.15.05.bb => nasm_2.16.01.bb} (88%)meta/recipes-devtools/nasm/nasm/0001-stdlib-Add-strlcat.patch +9 -9
@@ -1,4 +1,4 @@ -From 1c5023002bad3a5b0bbc181fdb324160beace733 Mon Sep 17 00:00:00 2001 +From 680220e772dfa381829983fa73b915416f676894 Mon Sep 17 00:00:00 2001 From: Joshua Watt <[email protected]> Date: Tue, 19 Nov 2019 12:47:30 -0600 Subject: [PATCH] stdlib: Add strlcat
@@ -17,23 +17,23 @@ Signed-off-by: Joshua Watt <[email protected]> create mode 100644 stdlib/strlcat.c diff --git a/Makefile.in b/Makefile.in -index bfae1f8..156dc4c 100644 +index b85ebee..045fabe 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -101,7 +101,7 @@ NASM = asm/nasm.$(O) - NDISASM = disasm/ndisasm.$(O) +@@ -104,7 +104,7 @@ PROGOBJ = $(NASM) $(NDISASM) + PROGS = nasm$(X) ndisasm$(X) - LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \ + LIBOBJ_NW = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \ - stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) \ + stdlib/strnlen.$(O) stdlib/strrchrnul.$(O) stdlib/strlcat.$(O) \ \ nasmlib/ver.$(O) \ nasmlib/alloc.$(O) nasmlib/asprintf.$(O) nasmlib/errfile.$(O) \ diff --git a/configure.ac b/configure.ac -index 7b72769..14fd033 100644 +index 42cd198..e206338 100644 --- a/configure.ac +++ b/configure.ac -@@ -234,6 +234,7 @@ PA_FUNC_SNPRINTF +@@ -236,6 +236,7 @@ PA_FUNC_SNPRINTF PA_FUNC_VSNPRINTF AC_CHECK_FUNCS([strlcpy]) AC_CHECK_FUNCS([strrchrnul])
@@ -41,7 +41,7 @@ index 7b72769..14fd033 100644 dnl These types are POSIX-specific, and Windows does it differently... AC_CHECK_TYPES([struct _stati64]) -@@ -253,6 +254,7 @@ AC_CHECK_DECLS(strsep) +@@ -255,6 +256,7 @@ AC_CHECK_DECLS(strsep) AC_CHECK_DECLS(strlcpy) AC_CHECK_DECLS(strnlen) AC_CHECK_DECLS(strrchrnul)
@@ -50,7 +50,7 @@ index 7b72769..14fd033 100644 dnl Check for missing types AC_TYPE_UINTPTR_T diff --git a/include/compiler.h b/include/compiler.h -index b4fd3a8..7fb4821 100644 +index 407c160..b64da6a 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -169,6 +169,10 @@ size_t strlcpy(char *, const char *, size_t);
meta/recipes-devtools/nasm/nasm/0002-Add-debug-prefix-map-option.patch +53 -21
155 lines not on this page · raw message
meta/recipes-devtools/nasm/nasm_2.16.01.bb renamed from meta/recipes-devtools/nasm/nasm_2.15.05.bb +1 -1
@@ -10,7 +10,7 @@ SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \ file://0002-Add-debug-prefix-map-option.patch \ " -SRC_URI[sha256sum] = "3c4b8339e5ab54b1bcb2316101f8985a5da50a3f9e504d43fa6f35668bee2fd0" +SRC_URI[sha256sum] = "35b6ad2ee048d41c4779f073f3efca7762a822b7d2d4ef4e8df24cf65747bb2e" EXTRA_AUTORECONF:append = " -I autoconf/m4"
Signature · 1 line
2.30.2
PATCH 5/77 ffmpeg: use nasm patched-in debug-prefix-map option to restore reproducibility
In reply to Alexander KanavinLatest nasm requires this as it otherwise writes full paths into its output.
--- meta/recipes-multimedia/ffmpeg/ffmpeg_5.1.2.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-multimedia/ffmpeg/ffmpeg_5.1.2.bb +1 -0
@@ -142,6 +142,7 @@ EXTRA_OEMAKE = "V=1" do_configure() { ${S}/configure ${EXTRA_OECONF} + sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} --debug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR},g" ${B}/ffbuild/config.mak } # patch out build host paths for reproducibility
Signature · 1 line
2.30.2
PATCH 6/77 gtk+3: update 3.24.35 -> 3.24.36
In reply to Alexander KanavinDrop autotools-specific chunks in opengl.patch.
Drop add-missing-meson.build.patch (.35 tarball issue) Drop buildpaths.patch (backport)
---
...d-introspection-according-to-option-.patch | 34 +++++++++++
.../gtk+/gtk+3/add-missing-meson.build.patch | 38 -------------
.../recipes-gnome/gtk+/gtk+3/buildpaths.patch | 57 -------------------
meta/recipes-gnome/gtk+/gtk+3/opengl.patch | 48 ++++------------
.../{gtk+3_3.24.35.bb => gtk+3_3.24.36.bb} | 5 +-
5 files changed, 46 insertions(+), 136 deletions(-)
create mode 100644 meta/recipes-gnome/gtk+/gtk+3/0001-meson.build-build-introspection-according-to-option-.patch
delete mode 100644 meta/recipes-gnome/gtk+/gtk+3/add-missing-meson.build.patch
delete mode 100644 meta/recipes-gnome/gtk+/gtk+3/buildpaths.patch
rename meta/recipes-gnome/gtk+/{gtk+3_3.24.35.bb => gtk+3_3.24.36.bb} (76%)meta/recipes-gnome/gtk+/gtk+3/0001-meson.build-build-introspection-according-to-option-.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 6e533d5598ef875f30b84d931aae11b768465869 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Mon, 2 Jan 2023 15:00:02 +0100 +Subject: [PATCH] meson.build: build introspection according to option only + +The way the check is written, if the build is native, then the +introspection option has no effect. + +Particularly yocto project does want to disable introspection in +native builds and enable it in cross builds (both via the option), +and without this patch the former is not possible. + +Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5382] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index bfc33af0f6..94ffaa7769 100644 +--- a/meson.build ++++ b/meson.build +@@ -854,7 +854,7 @@ endif + + # Introspection + gir = find_program('g-ir-scanner', required : get_option('introspection')) +-build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection')) ++build_gir = gir.found() and get_option('introspection') + + subdir('gdk') + subdir('gtk') +-- +2.30.2 +
meta/recipes-gnome/gtk+/gtk+3/add-missing-meson.build.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 8a00d0269d547799b598adda364ad6c6ee328e6b Mon Sep 17 00:00:00 2001 -From: Ross Burton <[email protected]> -Date: Tue, 20 Dec 2022 12:09:07 +0000 -Subject: [PATCH] Add missing meson.build - -This file was missing from the tarball, but will be in the .36 release. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton <[email protected]> - ---- - gdk/wayland/cursor/meson.build | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - create mode 100644 gdk/wayland/cursor/meson.build - -diff --git a/gdk/wayland/cursor/meson.build b/gdk/wayland/cursor/meson.build -new file mode 100644 -index 0000000..94cf47a ---- /dev/null -+++ b/gdk/wayland/cursor/meson.build -@@ -0,0 +1,14 @@ -+# This file is missing from the 3.24.35 tarball -+ -+wayland_cursor_sources = files([ -+ 'wayland-cursor.c', -+ 'xcursor.c', -+ 'os-compatibility.c' -+]) -+ -+libwayland_cursor = static_library('wayland+cursor', -+ sources: wayland_cursor_sources, -+ include_directories: [ confinc, ], -+ dependencies: [ glib_dep, wlclientdep, ], -+ c_args: common_cflags, -+) --- -2.34.1 -
meta/recipes-gnome/gtk+/gtk+3/buildpaths.patch deleted +0 -57
57 lines not on this page · raw message
meta/recipes-gnome/gtk+/gtk+3/opengl.patch +10 -38
113 lines not on this page · raw message
meta/recipes-gnome/gtk+/gtk+3_3.24.36.bb renamed from meta/recipes-gnome/gtk+/gtk+3_3.24.35.bb +2 -3
@@ -3,11 +3,10 @@ require gtk+3.inc MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ - file://add-missing-meson.build.patch \ - file://buildpaths.patch \ file://opengl.patch \ + file://0001-meson.build-build-introspection-according-to-option-.patch \ " -SRC_URI[sha256sum] = "ec10fe6d712ef0b3c63b5f932639c9d1ae99fce94f500f6f06965629fef60bd1" +SRC_URI[sha256sum] = "27a6ef157743350c807ffea59baa1d70226dbede82a5e953ffd58ea6059fe691" S = "${WORKDIR}/gtk+-${PV}"
Signature · 1 line
2.30.2
PATCH 7/77 libva-utils: update 2.16.0 -> 2.17.0
In reply to Alexander Kanavin---
.../libva/{libva-utils_2.16.0.bb => libva-utils_2.17.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-graphics/libva/{libva-utils_2.16.0.bb => libva-utils_2.17.0.bb} (90%)meta/recipes-graphics/libva/libva-utils_2.17.0.bb renamed from meta/recipes-graphics/libva/libva-utils_2.16.0.bb +2 -2
@@ -14,8 +14,8 @@ SECTION = "x11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e" -SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.16-branch;protocol=https" -SRCREV = "cdf39e1e3da85a91ef53438c3b6a97e77dda96aa" +SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.17-branch;protocol=https" +SRCREV = "42c02a6a37b1bfce91a7f15c898750f2ee9e3d6a" S = "${WORKDIR}/git" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))$"
Signature · 1 line
2.30.2
PATCH 8/77 xcb-util: update 0.4.0 -> 0.4.1
In reply to Alexander Kanavin---
.../xorg-lib/{xcb-util_0.4.0.bb => xcb-util_0.4.1.bb} | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
rename meta/recipes-graphics/xorg-lib/{xcb-util_0.4.0.bb => xcb-util_0.4.1.bb} (51%)meta/recipes-graphics/xorg-lib/xcb-util_0.4.1.bb renamed from meta/recipes-graphics/xorg-lib/xcb-util_0.4.0.bb +2 -3
@@ -1,10 +1,9 @@ require xcb-util.inc -SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.bz2" +SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.xz" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://src/xcb_aux.c;endline=30;md5=ae305b9c2a38f9ba27060191046a6460 \ file://src/xcb_event.h;endline=27;md5=627be355aee59e1b8ade80d5bd90fad9" -SRC_URI[md5sum] = "2e97feed81919465a04ccc71e4073313" -SRC_URI[sha256sum] = "46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9" +SRC_URI[sha256sum] = "5abe3bbbd8e54f0fa3ec945291b7e8fa8cfd3cccc43718f8758430f94126e512"
Signature · 1 line
2.30.2
PATCH 9/77 tiff: update 4.4.0 -> 4.5.0
In reply to Alexander KanavinDrop all CVE backports.
License-Update: formatting
---
...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 -------
...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 -----
...fcrop-S-option-Make-decision-simpler.patch | 36 -
...-incompatibility-of-Z-X-Y-z-options-.patch | 59 --
...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------
.../libtiff/files/CVE-2022-2953.patch | 86 ---
.../libtiff/files/CVE-2022-34526.patch | 32 -
.../libtiff/files/CVE-2022-3970.patch | 39 --
.../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +-
9 files changed, 4 insertions(+), 1368 deletions(-)
delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch
delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch
rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0 -266
@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -
meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0 -184
184 lines not on this page · raw message
meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0 -36
@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -
meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0 -59
59 lines not on this page · raw message
meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0 -653
653 lines not on this page · raw message
meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0 -86
86 lines not on this page · raw message
meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -
meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0 -39
@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -
meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4 -13
@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
Signature · 1 line
2.30.2
Re: [OE-core] [PATCH 09/77] tiff: update 4.4.0 -> 4.5.0
This regresses building gtk4-native. meson/configure fails
Found CMake: /mnt/b/yoe/master/build/tmp/work/x86_64-linux/gtk4-native/4.8.2-r0/recipe-sysroot-native/usr/bin/cmake (3.25.1)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libtiff-4
../gtk-4.8.2/meson.build:427:0: ERROR: Automatic wrap-based subproject downloading is disabled
Quoted 1,476 lines · Alexander Kanavin
Drop all CVE backports.
License-Update: formatting
Signed-off-by Alexander Kanavin <[email protected]>--- ...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 ------- ...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 ----- ...fcrop-S-option-Make-decision-simpler.patch | 36 - ...-incompatibility-of-Z-X-Y-z-options-.patch | 59 -- ...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------ .../libtiff/files/CVE-2022-2953.patch | 86 --- .../libtiff/files/CVE-2022-34526.patch | 32 - .../libtiff/files/CVE-2022-3970.patch | 39 -- .../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +- 9 files changed, 4 insertions(+), 1368 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0
-266@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0
-184@@ -1,184 +0,0 @@ -CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001 -From: 4ugustus <[email protected]> -Date: Sat, 11 Jun 2022 09:31:43 +0000 -Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428) - ---- - libtiff/tif_aux.c | 9 +++++++ - libtiff/tiffiop.h | 1 + - tools/tiffcrop.c | 62 ++++++++++++++++++++++++++--------------------- - 3 files changed, 44 insertions(+), 28 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 140f26c7..5b88c8d0 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val ) - return (float)val; - } - -+uint32_t _TIFFClampDoubleToUInt32(double val) -+{ -+ if( val < 0 ) -+ return 0; -+ if( val > 0xFFFFFFFFU || val != val ) -+ return 0xFFFFFFFFU; -+ return (uint32_t)val; -+} -+ - int _TIFFSeekOK(TIFF* tif, toff_t off) - { - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index e3af461d..4e8bdac2 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t); - extern float _TIFFUInt64ToFloat(uint64_t); - - extern float _TIFFClampDoubleToFloat(double); -+extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern tmsize_t - _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip, -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 1f827b2b..90286a5e 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) - { -- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); -- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); -- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); -- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); - } - else - { -- x1 = (uint32_t) (crop->corners[i].X1); -- x2 = (uint32_t) (crop->corners[i].X2); -- y1 = (uint32_t) (crop->corners[i].Y1); -- y2 = (uint32_t) (crop->corners[i].Y2); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to bottom-right. -@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ -- tmargin = (uint32_t)(crop->margins[0]); -- lmargin = (uint32_t)(crop->margins[1]); -- bmargin = (uint32_t)(crop->margins[2]); -- rmargin = (uint32_t)(crop->margins[3]); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ -- tmargin = (uint32_t)(crop->margins[0] * scale * yres); -- lmargin = (uint32_t)(crop->margins[1] * scale * xres); -- bmargin = (uint32_t)(crop->margins[2] * scale * yres); -- rmargin = (uint32_t)(crop->margins[3] * scale * xres); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if ((lmargin + rmargin) > image->width) -@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)crop->width; -+ width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)crop->length; -+ length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)(crop->width * scale * image->xres); -+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)(crop->length * scale * image->yres); -+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } -@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ -- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ -- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8)); - } - - if ((hmargin * 2.0) > (pwidth * page->hres)) -@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->mode & PAGE_MODE_PAPERSIZE ) - { -- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2)); -- olength = (uint32_t)((plength * page->vres) - (vmargin * 2)); -+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); -+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2)); - } - else - { -- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres)); -- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres)); -+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); -+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - -@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - if (olength > ilength) - olength = ilength; - -+ if (owidth == 0 || olength == 0) -+ { -+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages"); -+ exit(EXIT_FAILURE); -+ } -+ - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0
-36@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0
-59@@ -1,59 +0,0 @@ -CVE: CVE-2022-3597 CVE-2022-3626 CVE-2022-3627 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 4746f16253b784287bc8a5003990c1c3b9a03a62 Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Thu, 25 Aug 2022 16:11:41 +0200 -Subject: [PATCH] tiffcrop: disable incompatibility of -Z, -X, -Y, -z options - with any PAGE_MODE_x option (fixes #411 and #413) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - -Code analysis: - -With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. -In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - -Execution of the else-clause often leads to buffer-overflows. - -Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - -The MR solves issues #411 and #413. ---- - doc/tools/tiffcrop.rst | 8 ++++++++ - tools/tiffcrop.c | 32 +++++++++++++++++++++++++------- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 8fd856dc..41a2ea36 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2138,9 +2143,20 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } -+ -+ /* Check for not allowed combination: -+ * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -+ * such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. -+. */ -+ if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) { -+ TIFFError("tiffcrop input error", -+ "Any of the crop options -X, -Y, -Z and -z together with other PAGE_MODE_x options such as - H, -V, -P, -J or -K is not supported and may cause buffer overflows..->exit"); -+ exit(EXIT_FAILURE); -+ } -+ - } /* end process_command_opts */ - - /* Start a new output file if one has not been previously opened or --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0
-653@@ -1,653 +0,0 @@ -CVE: CVE-2022-3570 CVE-2022-3598 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From afd7086090dafd3949afd172822cbcec4ed17d56 Mon Sep 17 00:00:00 2001 -From: Su Laus <[email protected]> -Date: Thu, 13 Oct 2022 14:33:27 +0000 -Subject: [PATCH] tiffcrop subroutines require a larger buffer (fixes #271, - #381, #386, #388, #389, #435) - ---- - tools/tiffcrop.c | 209 ++++++++++++++++++++++++++--------------------- - 1 file changed, 118 insertions(+), 91 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 41a2ea36..deab5feb 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -212,6 +212,10 @@ static char tiffcrop_rev_date[] = "26-08-2022"; - - #define TIFF_DIR_MAX 65534 - -+/* Some conversion subroutines require image buffers, which are at least 3 bytes -+ * larger than the necessary size for the image itself. */ -+#define NUM_BUFF_OVERSIZE_BYTES 3 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32_t tmargin; -@@ -233,7 +237,7 @@ struct offset { - */ - - struct buffinfo { -- uint32_t size; /* size of this buffer */ -+ size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ - }; - -@@ -810,8 +814,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; -- uint32_t tile_rowsize = TIFFTileRowSize(in); -- uint32_t src_offset, dst_offset; -+ tmsize_t tile_rowsize = TIFFTileRowSize(in); -+ tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t*) buf; - unsigned char *src = NULL; -@@ -861,7 +865,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } -- tilebuf = limitMalloc(tile_buffsize + 3); -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; -@@ -1024,7 +1028,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8_t *obuf, - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; -- tbuff = (unsigned char *)limitMalloc(tilesize + 8); -+ tbuff = (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError ("readSeparateTilesIntoBuffer", -@@ -1217,7 +1221,8 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - -- obuf = limitMalloc (rowstripsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ obuf = limitMalloc (rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - -@@ -1229,7 +1234,7 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); -- memset (obuf, '\0', rowstripsize); -+ memset (obuf, '\0',rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump)) - { - _TIFFfree(obuf); -@@ -1237,10 +1242,15 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { -- dump_info(dump->outfile, dump->format,"", -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } -+ dump_info(dump->outfile, dump->format,"", - "Sample %2d, Strip: %2d, bytes: %4d, Row %4d, bytes: %4d, Input offset: %6d", -- s + 1, strip + 1, stripsize, row + 1, scanlinesize, src - buf); -- dump_buffer(dump->outfile, dump->format, nrows, scanlinesize, row, obuf); -+ s + 1, strip + 1, stripsize, row + 1, (uint32_t)scanlinesize, src - buf); -+ dump_buffer(dump->outfile, dump->format, nrows, (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) -@@ -1267,7 +1277,7 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -- uint32_t tile_rowsize = TIFFTileRowSize(out); -+ tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t* bufp = (uint8_t*) buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); -@@ -1310,9 +1320,11 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - -- tilebuf = limitMalloc(tile_buffsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; -+ memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; -@@ -1358,7 +1370,8 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - uint32_t imagewidth, tsample_t spp, - struct dump_opts * dump) - { -- tdata_t obuf = limitMalloc(TIFFTileSize(out)); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -@@ -1368,6 +1381,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - - if (obuf == NULL) - return 1; -+ memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || -@@ -1793,14 +1807,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - - *opt_offset = '\0'; - /* convert option to lowercase */ -- end = strlen (opt_ptr); -+ end = (unsigned int)strlen (opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ -- end = strlen (opt_offset + 1); -+ end = (unsigned int)strlen (opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int) *(opt_offset + i)); - /* check dump format value */ -@@ -2273,6 +2287,8 @@ main(int argc, char* argv[]) - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ - -+ assert(NUM_BUFF_OVERSIZE_BYTES >= 3); -+ - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); -@@ -3227,13 +3243,13 @@ extractContigSamples32bits (uint8_t *in, uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3642,13 +3658,13 @@ extractContigSamplesShifted32bits (uint8_t *in, uint8_t *out, uint32_t cols, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3825,10 +3841,10 @@ extractContigSamplesToTileBuffer(uint8_t *out, uint8_t *in, uint32_t rows, uint3 - static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - { - uint8_t* bufp = buf; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); -- uint32_t stripsize = TIFFStripSize(in); -- uint32_t rows = 0; -+ tmsize_t stripsize = TIFFStripSize(in); -+ tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - -@@ -3841,11 +3857,11 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) -- TIFFError("", "Strip %"PRIu32": read %"PRId32" bytes, strip size %"PRIu32, -+ TIFFError("", "Strip %"PRIu32": read %"PRId64" bytes, strip size %"PRIu64, - strip + 1, bytes_read, stripsize); - - if (bytes_read < 0 && !ignore) { -- TIFFError("", "Error reading strip %"PRIu32" after %"PRIu32" rows", -+ TIFFError("", "Error reading strip %"PRIu32" after %"PRIu64" rows", - strip, rows); - return 0; - } -@@ -4310,13 +4326,13 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4359,10 +4375,10 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4835,13 +4851,13 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4884,10 +4900,10 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4910,7 +4926,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - { - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; -@@ -4976,7 +4992,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; -- buff = limitMalloc(stripsize + 3); -+ buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError ("readSeparateStripsIntoBuffer", -@@ -4999,7 +5015,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip (in, strip, buff, stripsize); -- rows_this_strip = bytes_read / src_rowsize; -+ rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), -@@ -6062,13 +6078,14 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; -- uint32_t stsize = 0, tlsize = 0, buffsize = 0, scanlinesize = 0; -+ tmsize_t stsize = 0, tlsize = 0, buffsize = 0; -+ tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ -- uint32_t tile_rowsize = 0; -+ tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - unsigned char *new_buff = NULL; - int readunit = 0; -- static uint32_t prev_readsize = 0; -+ static tmsize_t prev_readsize = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); -@@ -6325,6 +6342,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). -+ * Furthermore, functions like extractContigSamplesShifted32bits() -+ * need a buffer, which is at least 3 bytes larger than the actual image. - * Otherwise buffer-overflow might occur there. - */ - buffsize_check = length * (uint32_t)(((width * spp * bps) + 7) / 8); -@@ -6376,7 +6395,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { -@@ -6387,11 +6406,11 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- new_buff = _TIFFrealloc(read_buff, buffsize+3); -+ new_buff = _TIFFrealloc(read_buff, buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (read_buff); -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - read_buff = new_buff; -@@ -6464,8 +6483,13 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - dump_info (dump->infile, dump->format, "", - "Bits per sample %"PRIu16", Samples per pixel %"PRIu16, bps, spp); - -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } - for (i = 0; i < length; i++) -- dump_buffer(dump->infile, dump->format, 1, scanlinesize, -+ dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -@@ -7485,13 +7509,13 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -7554,23 +7578,23 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - - if (!sect_buff) - { -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { -- new_buff = _TIFFrealloc(sect_buff, sectsize); -+ new_buff = _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree (sect_buff); -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; -@@ -7580,7 +7604,7 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -7611,17 +7635,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7634,7 +7658,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - -@@ -7714,17 +7738,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7737,7 +7761,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - -@@ -7853,24 +7877,24 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { -- new_buff = _TIFFrealloc(crop_buff, cropsize); -+ new_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; -@@ -7879,7 +7903,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -8177,13 +8201,13 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -8568,13 +8592,13 @@ rotateContigSamples32bits(uint16_t rotation, uint16_t spp, uint16_t bps, uint32_ - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -8643,12 +8667,13 @@ rotateImage(uint16_t rotation, struct image_data *image, uint32_t *img_width, - return (-1); - } - -- if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) -+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */ -+ if (!(rbuff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { -- TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); -+ TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -- _TIFFmemset(rbuff, '\0', buffsize); -+ _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - - ibuff = *ibuff_ptr; - switch (rotation) -@@ -9176,13 +9201,13 @@ reverseSamples32bits (uint16_t spp, uint16_t bps, uint32_t width, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -9273,12 +9298,13 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - case MIRROR_BOTH: - case MIRROR_VERT: -- line_buff = (unsigned char *)limitMalloc(rowsize); -+ line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { -- TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); -+ TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) -@@ -9310,11 +9336,12 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - } - else - { /* non 8 bit per sample data */ -- if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) -+ if (!(line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) -@@ -9326,7 +9353,7 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - row_offset = row * rowsize; - src = ibuff + row_offset; -- _TIFFmemset (line_buff, '\0', rowsize); -+ _TIFFmemset (line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: if (reverseSamples16bits(spp, bps, width, src, line_buff)) --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0
-86@@ -1,86 +0,0 @@ -CVE: CVE-2022-2953 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Mon, 15 Aug 2022 22:11:03 +0200 -Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?= - =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?= - =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?= - =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?= - =?UTF-8?q?Z=20and=20-z.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - -This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 ---- - tools/tiffcrop.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 90286a5e..c3b758ec 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022"; - #define ROTATECW_270 32 - #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - --#define CROP_NONE 0 --#define CROP_MARGINS 1 --#define CROP_WIDTH 2 --#define CROP_LENGTH 4 --#define CROP_ZONES 8 --#define CROP_REGIONS 16 -+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */ -+#define CROP_MARGINS 1 /* "-m" */ -+#define CROP_WIDTH 2 /* "-X" */ -+#define CROP_LENGTH 4 /* "-Y" */ -+#define CROP_ZONES 8 /* "-Z" */ -+#define CROP_REGIONS 16 /* "-z" */ - #define CROP_ROTATE 32 - #define CROP_MIRROR 64 - #define CROP_INVERT 128 -@@ -316,7 +316,7 @@ struct crop_mask { - #define PAGE_MODE_RESOLUTION 1 - #define PAGE_MODE_PAPERSIZE 2 - #define PAGE_MODE_MARGINS 4 --#define PAGE_MODE_ROWSCOLS 8 -+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - - #define INVERT_DATA_ONLY 10 - #define INVERT_DATA_AND_TAG 11 -@@ -781,7 +781,7 @@ static const char usage_info[] = - " The four debug/dump options are independent, though it makes little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" --"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n" -+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given selection successively.\n" - "\n" - ; -@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - /*NOTREACHED*/ - } - } -- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/ -- char XY, Z, R; -+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ -+ char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); - Z = (crop_data->crop_mode & CROP_ZONES); - R = (crop_data->crop_mode & CROP_REGIONS); -- if ((XY && Z) || (XY && R) || (Z && R)) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit"); -+ S = (page->mode & PAGE_MODE_ROWSCOLS); -+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } - } /* end process_command_opts */ --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0
-32@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0
-39@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4
-14@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175395): https://lists.openembedded.org/g/openembedded-core/message/175395
Mute This Topic: https://lists.openembedded.org/mt/96047877/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 09/77] tiff: update 4.4.0 -> 4.5.0
The regression seems local to your setup. On poky, gtk4-native builds fine:
Run-time dependency libtiff-4 found: YES 4.5.0
Or it's caused by something else still.
Alex
Quoted 1,488 lines · Khem Raj
This regresses building gtk4-native. meson/configure fails
Found CMake:
/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gtk4-native/4.8.2-r0/recipe-sysroot-native/usr/bin/cmake(3.25.1)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libtiff-4../gtk-4.8.2/meson.build:427:0: ERROR: Automatic wrap-based subproject downloading is disabled
Quoted 1,476 lines · Alexander Kanavin
Drop all CVE backports.
License-Update: formatting
Signed-off-by Alexander Kanavin <[email protected]>--- ...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 ------- ...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 ----- ...fcrop-S-option-Make-decision-simpler.patch | 36 - ...-incompatibility-of-Z-X-Y-z-options-.patch | 59 -- ...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------ .../libtiff/files/CVE-2022-2953.patch | 86 --- .../libtiff/files/CVE-2022-34526.patch | 32 - .../libtiff/files/CVE-2022-3970.patch | 39 -- .../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +- 9 files changed, 4 insertions(+), 1368 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0
-266@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0
-184@@ -1,184 +0,0 @@ -CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001 -From: 4ugustus <[email protected]> -Date: Sat, 11 Jun 2022 09:31:43 +0000 -Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428) - ---- - libtiff/tif_aux.c | 9 +++++++ - libtiff/tiffiop.h | 1 + - tools/tiffcrop.c | 62 ++++++++++++++++++++++++++--------------------- - 3 files changed, 44 insertions(+), 28 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 140f26c7..5b88c8d0 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val ) - return (float)val; - } - -+uint32_t _TIFFClampDoubleToUInt32(double val) -+{ -+ if( val < 0 ) -+ return 0; -+ if( val > 0xFFFFFFFFU || val != val ) -+ return 0xFFFFFFFFU; -+ return (uint32_t)val; -+} -+ - int _TIFFSeekOK(TIFF* tif, toff_t off) - { - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index e3af461d..4e8bdac2 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t); - extern float _TIFFUInt64ToFloat(uint64_t); - - extern float _TIFFClampDoubleToFloat(double); -+extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern tmsize_t - _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip, -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 1f827b2b..90286a5e 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) - { -- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); -- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); -- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); -- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); - } - else - { -- x1 = (uint32_t) (crop->corners[i].X1); -- x2 = (uint32_t) (crop->corners[i].X2); -- y1 = (uint32_t) (crop->corners[i].Y1); -- y2 = (uint32_t) (crop->corners[i].Y2); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to bottom-right. -@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ -- tmargin = (uint32_t)(crop->margins[0]); -- lmargin = (uint32_t)(crop->margins[1]); -- bmargin = (uint32_t)(crop->margins[2]); -- rmargin = (uint32_t)(crop->margins[3]); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ -- tmargin = (uint32_t)(crop->margins[0] * scale * yres); -- lmargin = (uint32_t)(crop->margins[1] * scale * xres); -- bmargin = (uint32_t)(crop->margins[2] * scale * yres); -- rmargin = (uint32_t)(crop->margins[3] * scale * xres); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if ((lmargin + rmargin) > image->width) -@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)crop->width; -+ width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)crop->length; -+ length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)(crop->width * scale * image->xres); -+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)(crop->length * scale * image->yres); -+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } -@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ -- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ -- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8)); - } - - if ((hmargin * 2.0) > (pwidth * page->hres)) -@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->mode & PAGE_MODE_PAPERSIZE ) - { -- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2)); -- olength = (uint32_t)((plength * page->vres) - (vmargin * 2)); -+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); -+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2)); - } - else - { -- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres)); -- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres)); -+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); -+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - -@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - if (olength > ilength) - olength = ilength; - -+ if (owidth == 0 || olength == 0) -+ { -+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages"); -+ exit(EXIT_FAILURE); -+ } -+ - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0
-36@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0
-59@@ -1,59 +0,0 @@ -CVE: CVE-2022-3597 CVE-2022-3626 CVE-2022-3627 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 4746f16253b784287bc8a5003990c1c3b9a03a62 Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Thu, 25 Aug 2022 16:11:41 +0200 -Subject: [PATCH] tiffcrop: disable incompatibility of -Z, -X, -Y, -z options - with any PAGE_MODE_x option (fixes #411 and #413) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - -Code analysis: - -With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. -In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - -Execution of the else-clause often leads to buffer-overflows. - -Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - -The MR solves issues #411 and #413. ---- - doc/tools/tiffcrop.rst | 8 ++++++++ - tools/tiffcrop.c | 32 +++++++++++++++++++++++++------- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 8fd856dc..41a2ea36 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2138,9 +2143,20 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } -+ -+ /* Check for not allowed combination: -+ * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -+ * such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. -+. */ -+ if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) { -+ TIFFError("tiffcrop input error", -+ "Any of the crop options -X, -Y, -Z and -z together with other PAGE_MODE_x options such as - H, -V, -P, -J or -K is not supported and may cause buffer overflows..->exit"); -+ exit(EXIT_FAILURE); -+ } -+ - } /* end process_command_opts */ - - /* Start a new output file if one has not been previously opened or --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0
-653@@ -1,653 +0,0 @@ -CVE: CVE-2022-3570 CVE-2022-3598 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From afd7086090dafd3949afd172822cbcec4ed17d56 Mon Sep 17 00:00:00 2001 -From: Su Laus <[email protected]> -Date: Thu, 13 Oct 2022 14:33:27 +0000 -Subject: [PATCH] tiffcrop subroutines require a larger buffer (fixes #271, - #381, #386, #388, #389, #435) - ---- - tools/tiffcrop.c | 209 ++++++++++++++++++++++++++--------------------- - 1 file changed, 118 insertions(+), 91 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 41a2ea36..deab5feb 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -212,6 +212,10 @@ static char tiffcrop_rev_date[] = "26-08-2022"; - - #define TIFF_DIR_MAX 65534 - -+/* Some conversion subroutines require image buffers, which are at least 3 bytes -+ * larger than the necessary size for the image itself. */ -+#define NUM_BUFF_OVERSIZE_BYTES 3 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32_t tmargin; -@@ -233,7 +237,7 @@ struct offset { - */ - - struct buffinfo { -- uint32_t size; /* size of this buffer */ -+ size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ - }; - -@@ -810,8 +814,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; -- uint32_t tile_rowsize = TIFFTileRowSize(in); -- uint32_t src_offset, dst_offset; -+ tmsize_t tile_rowsize = TIFFTileRowSize(in); -+ tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t*) buf; - unsigned char *src = NULL; -@@ -861,7 +865,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } -- tilebuf = limitMalloc(tile_buffsize + 3); -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; -@@ -1024,7 +1028,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8_t *obuf, - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; -- tbuff = (unsigned char *)limitMalloc(tilesize + 8); -+ tbuff = (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError ("readSeparateTilesIntoBuffer", -@@ -1217,7 +1221,8 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - -- obuf = limitMalloc (rowstripsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ obuf = limitMalloc (rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - -@@ -1229,7 +1234,7 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); -- memset (obuf, '\0', rowstripsize); -+ memset (obuf, '\0',rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump)) - { - _TIFFfree(obuf); -@@ -1237,10 +1242,15 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { -- dump_info(dump->outfile, dump->format,"", -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } -+ dump_info(dump->outfile, dump->format,"", - "Sample %2d, Strip: %2d, bytes: %4d, Row %4d, bytes: %4d, Input offset: %6d", -- s + 1, strip + 1, stripsize, row + 1, scanlinesize, src - buf); -- dump_buffer(dump->outfile, dump->format, nrows, scanlinesize, row, obuf); -+ s + 1, strip + 1, stripsize, row + 1, (uint32_t)scanlinesize, src - buf); -+ dump_buffer(dump->outfile, dump->format, nrows, (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) -@@ -1267,7 +1277,7 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -- uint32_t tile_rowsize = TIFFTileRowSize(out); -+ tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t* bufp = (uint8_t*) buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); -@@ -1310,9 +1320,11 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - -- tilebuf = limitMalloc(tile_buffsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; -+ memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; -@@ -1358,7 +1370,8 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - uint32_t imagewidth, tsample_t spp, - struct dump_opts * dump) - { -- tdata_t obuf = limitMalloc(TIFFTileSize(out)); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -@@ -1368,6 +1381,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - - if (obuf == NULL) - return 1; -+ memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || -@@ -1793,14 +1807,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - - *opt_offset = '\0'; - /* convert option to lowercase */ -- end = strlen (opt_ptr); -+ end = (unsigned int)strlen (opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ -- end = strlen (opt_offset + 1); -+ end = (unsigned int)strlen (opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int) *(opt_offset + i)); - /* check dump format value */ -@@ -2273,6 +2287,8 @@ main(int argc, char* argv[]) - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ - -+ assert(NUM_BUFF_OVERSIZE_BYTES >= 3); -+ - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); -@@ -3227,13 +3243,13 @@ extractContigSamples32bits (uint8_t *in, uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3642,13 +3658,13 @@ extractContigSamplesShifted32bits (uint8_t *in, uint8_t *out, uint32_t cols, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3825,10 +3841,10 @@ extractContigSamplesToTileBuffer(uint8_t *out, uint8_t *in, uint32_t rows, uint3 - static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - { - uint8_t* bufp = buf; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); -- uint32_t stripsize = TIFFStripSize(in); -- uint32_t rows = 0; -+ tmsize_t stripsize = TIFFStripSize(in); -+ tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - -@@ -3841,11 +3857,11 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) -- TIFFError("", "Strip %"PRIu32": read %"PRId32" bytes, strip size %"PRIu32, -+ TIFFError("", "Strip %"PRIu32": read %"PRId64" bytes, strip size %"PRIu64, - strip + 1, bytes_read, stripsize); - - if (bytes_read < 0 && !ignore) { -- TIFFError("", "Error reading strip %"PRIu32" after %"PRIu32" rows", -+ TIFFError("", "Error reading strip %"PRIu32" after %"PRIu64" rows", - strip, rows); - return 0; - } -@@ -4310,13 +4326,13 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4359,10 +4375,10 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4835,13 +4851,13 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4884,10 +4900,10 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4910,7 +4926,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - { - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; -@@ -4976,7 +4992,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; -- buff = limitMalloc(stripsize + 3); -+ buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError ("readSeparateStripsIntoBuffer", -@@ -4999,7 +5015,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip (in, strip, buff, stripsize); -- rows_this_strip = bytes_read / src_rowsize; -+ rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), -@@ -6062,13 +6078,14 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; -- uint32_t stsize = 0, tlsize = 0, buffsize = 0, scanlinesize = 0; -+ tmsize_t stsize = 0, tlsize = 0, buffsize = 0; -+ tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ -- uint32_t tile_rowsize = 0; -+ tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - unsigned char *new_buff = NULL; - int readunit = 0; -- static uint32_t prev_readsize = 0; -+ static tmsize_t prev_readsize = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); -@@ -6325,6 +6342,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). -+ * Furthermore, functions like extractContigSamplesShifted32bits() -+ * need a buffer, which is at least 3 bytes larger than the actual image. - * Otherwise buffer-overflow might occur there. - */ - buffsize_check = length * (uint32_t)(((width * spp * bps) + 7) / 8); -@@ -6376,7 +6395,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { -@@ -6387,11 +6406,11 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- new_buff = _TIFFrealloc(read_buff, buffsize+3); -+ new_buff = _TIFFrealloc(read_buff, buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (read_buff); -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - read_buff = new_buff; -@@ -6464,8 +6483,13 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - dump_info (dump->infile, dump->format, "", - "Bits per sample %"PRIu16", Samples per pixel %"PRIu16, bps, spp); - -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } - for (i = 0; i < length; i++) -- dump_buffer(dump->infile, dump->format, 1, scanlinesize, -+ dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -@@ -7485,13 +7509,13 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -7554,23 +7578,23 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - - if (!sect_buff) - { -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { -- new_buff = _TIFFrealloc(sect_buff, sectsize); -+ new_buff = _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree (sect_buff); -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; -@@ -7580,7 +7604,7 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -7611,17 +7635,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7634,7 +7658,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - -@@ -7714,17 +7738,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7737,7 +7761,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - -@@ -7853,24 +7877,24 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { -- new_buff = _TIFFrealloc(crop_buff, cropsize); -+ new_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; -@@ -7879,7 +7903,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -8177,13 +8201,13 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -8568,13 +8592,13 @@ rotateContigSamples32bits(uint16_t rotation, uint16_t spp, uint16_t bps, uint32_ - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -8643,12 +8667,13 @@ rotateImage(uint16_t rotation, struct image_data *image, uint32_t *img_width, - return (-1); - } - -- if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) -+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */ -+ if (!(rbuff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { -- TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); -+ TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -- _TIFFmemset(rbuff, '\0', buffsize); -+ _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - - ibuff = *ibuff_ptr; - switch (rotation) -@@ -9176,13 +9201,13 @@ reverseSamples32bits (uint16_t spp, uint16_t bps, uint32_t width, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -9273,12 +9298,13 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - case MIRROR_BOTH: - case MIRROR_VERT: -- line_buff = (unsigned char *)limitMalloc(rowsize); -+ line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { -- TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); -+ TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) -@@ -9310,11 +9336,12 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - } - else - { /* non 8 bit per sample data */ -- if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) -+ if (!(line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) -@@ -9326,7 +9353,7 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - row_offset = row * rowsize; - src = ibuff + row_offset; -- _TIFFmemset (line_buff, '\0', rowsize); -+ _TIFFmemset (line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: if (reverseSamples16bits(spp, bps, width, src, line_buff)) --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0
-86@@ -1,86 +0,0 @@ -CVE: CVE-2022-2953 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Mon, 15 Aug 2022 22:11:03 +0200 -Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?= - =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?= - =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?= - =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?= - =?UTF-8?q?Z=20and=20-z.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - -This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 ---- - tools/tiffcrop.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 90286a5e..c3b758ec 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022"; - #define ROTATECW_270 32 - #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - --#define CROP_NONE 0 --#define CROP_MARGINS 1 --#define CROP_WIDTH 2 --#define CROP_LENGTH 4 --#define CROP_ZONES 8 --#define CROP_REGIONS 16 -+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */ -+#define CROP_MARGINS 1 /* "-m" */ -+#define CROP_WIDTH 2 /* "-X" */ -+#define CROP_LENGTH 4 /* "-Y" */ -+#define CROP_ZONES 8 /* "-Z" */ -+#define CROP_REGIONS 16 /* "-z" */ - #define CROP_ROTATE 32 - #define CROP_MIRROR 64 - #define CROP_INVERT 128 -@@ -316,7 +316,7 @@ struct crop_mask { - #define PAGE_MODE_RESOLUTION 1 - #define PAGE_MODE_PAPERSIZE 2 - #define PAGE_MODE_MARGINS 4 --#define PAGE_MODE_ROWSCOLS 8 -+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - - #define INVERT_DATA_ONLY 10 - #define INVERT_DATA_AND_TAG 11 -@@ -781,7 +781,7 @@ static const char usage_info[] = - " The four debug/dump options are independent, though it makes little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" --"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n" -+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given selection successively.\n" - "\n" - ; -@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - /*NOTREACHED*/ - } - } -- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/ -- char XY, Z, R; -+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ -+ char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); - Z = (crop_data->crop_mode & CROP_ZONES); - R = (crop_data->crop_mode & CROP_REGIONS); -- if ((XY && Z) || (XY && R) || (Z && R)) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit"); -+ S = (page->mode & PAGE_MODE_ROWSCOLS); -+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } - } /* end process_command_opts */ --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0
-32@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0
-39@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4
-14@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175395): https://lists.openembedded.org/g/openembedded-core/message/175395
Mute This Topic: https://lists.openembedded.org/mt/96047877/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 09/77] tiff: update 4.4.0 -> 4.5.0
Quoted 6 lines · Alexander Kanavin
The regression seems local to your setup. On poky, gtk4-native builds fine:
Run-time dependency libtiff-4 found: YES 4.5.0
Or it's caused by something else still.
debian folks are also seeing problem
https://www.mail-archive.com/[email protected]/msg1886646.html
Quoted 1,492 lines
Alex
Quoted 1,488 lines · Khem Raj
This regresses building gtk4-native. meson/configure fails
Found CMake:
/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gtk4-native/4.8.2-r0/recipe-sysroot-native/usr/bin/cmake(3.25.1)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libtiff-4../gtk-4.8.2/meson.build:427:0: ERROR: Automatic wrap-based subproject downloading is disabled
Quoted 1,476 lines · Alexander Kanavin
Drop all CVE backports.
License-Update: formatting
Signed-off-by Alexander Kanavin <[email protected]>--- ...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 ------- ...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 ----- ...fcrop-S-option-Make-decision-simpler.patch | 36 - ...-incompatibility-of-Z-X-Y-z-options-.patch | 59 -- ...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------ .../libtiff/files/CVE-2022-2953.patch | 86 --- .../libtiff/files/CVE-2022-34526.patch | 32 - .../libtiff/files/CVE-2022-3970.patch | 39 -- .../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +- 9 files changed, 4 insertions(+), 1368 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0
-266@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0
-184@@ -1,184 +0,0 @@ -CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001 -From: 4ugustus <[email protected]> -Date: Sat, 11 Jun 2022 09:31:43 +0000 -Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428) - ---- - libtiff/tif_aux.c | 9 +++++++ - libtiff/tiffiop.h | 1 + - tools/tiffcrop.c | 62 ++++++++++++++++++++++++++--------------------- - 3 files changed, 44 insertions(+), 28 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 140f26c7..5b88c8d0 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val ) - return (float)val; - } - -+uint32_t _TIFFClampDoubleToUInt32(double val) -+{ -+ if( val < 0 ) -+ return 0; -+ if( val > 0xFFFFFFFFU || val != val ) -+ return 0xFFFFFFFFU; -+ return (uint32_t)val; -+} -+ - int _TIFFSeekOK(TIFF* tif, toff_t off) - { - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index e3af461d..4e8bdac2 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t); - extern float _TIFFUInt64ToFloat(uint64_t); - - extern float _TIFFClampDoubleToFloat(double); -+extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern tmsize_t - _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip, -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 1f827b2b..90286a5e 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) - { -- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); -- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); -- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); -- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); - } - else - { -- x1 = (uint32_t) (crop->corners[i].X1); -- x2 = (uint32_t) (crop->corners[i].X2); -- y1 = (uint32_t) (crop->corners[i].Y1); -- y2 = (uint32_t) (crop->corners[i].Y2); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to bottom-right. -@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ -- tmargin = (uint32_t)(crop->margins[0]); -- lmargin = (uint32_t)(crop->margins[1]); -- bmargin = (uint32_t)(crop->margins[2]); -- rmargin = (uint32_t)(crop->margins[3]); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ -- tmargin = (uint32_t)(crop->margins[0] * scale * yres); -- lmargin = (uint32_t)(crop->margins[1] * scale * xres); -- bmargin = (uint32_t)(crop->margins[2] * scale * yres); -- rmargin = (uint32_t)(crop->margins[3] * scale * xres); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if ((lmargin + rmargin) > image->width) -@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)crop->width; -+ width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)crop->length; -+ length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)(crop->width * scale * image->xres); -+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)(crop->length * scale * image->yres); -+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } -@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ -- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ -- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8)); - } - - if ((hmargin * 2.0) > (pwidth * page->hres)) -@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->mode & PAGE_MODE_PAPERSIZE ) - { -- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2)); -- olength = (uint32_t)((plength * page->vres) - (vmargin * 2)); -+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); -+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2)); - } - else - { -- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres)); -- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres)); -+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); -+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - -@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - if (olength > ilength) - olength = ilength; - -+ if (owidth == 0 || olength == 0) -+ { -+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages"); -+ exit(EXIT_FAILURE); -+ } -+ - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0
-36@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0
-59@@ -1,59 +0,0 @@ -CVE: CVE-2022-3597 CVE-2022-3626 CVE-2022-3627 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 4746f16253b784287bc8a5003990c1c3b9a03a62 Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Thu, 25 Aug 2022 16:11:41 +0200 -Subject: [PATCH] tiffcrop: disable incompatibility of -Z, -X, -Y, -z options - with any PAGE_MODE_x option (fixes #411 and #413) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - -Code analysis: - -With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. -In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - -Execution of the else-clause often leads to buffer-overflows. - -Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - -The MR solves issues #411 and #413. ---- - doc/tools/tiffcrop.rst | 8 ++++++++ - tools/tiffcrop.c | 32 +++++++++++++++++++++++++------- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 8fd856dc..41a2ea36 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2138,9 +2143,20 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } -+ -+ /* Check for not allowed combination: -+ * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -+ * such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. -+. */ -+ if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) { -+ TIFFError("tiffcrop input error", -+ "Any of the crop options -X, -Y, -Z and -z together with other PAGE_MODE_x options such as - H, -V, -P, -J or -K is not supported and may cause buffer overflows..->exit"); -+ exit(EXIT_FAILURE); -+ } -+ - } /* end process_command_opts */ - - /* Start a new output file if one has not been previously opened or --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0
-653@@ -1,653 +0,0 @@ -CVE: CVE-2022-3570 CVE-2022-3598 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From afd7086090dafd3949afd172822cbcec4ed17d56 Mon Sep 17 00:00:00 2001 -From: Su Laus <[email protected]> -Date: Thu, 13 Oct 2022 14:33:27 +0000 -Subject: [PATCH] tiffcrop subroutines require a larger buffer (fixes #271, - #381, #386, #388, #389, #435) - ---- - tools/tiffcrop.c | 209 ++++++++++++++++++++++++++--------------------- - 1 file changed, 118 insertions(+), 91 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 41a2ea36..deab5feb 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -212,6 +212,10 @@ static char tiffcrop_rev_date[] = "26-08-2022"; - - #define TIFF_DIR_MAX 65534 - -+/* Some conversion subroutines require image buffers, which are at least 3 bytes -+ * larger than the necessary size for the image itself. */ -+#define NUM_BUFF_OVERSIZE_BYTES 3 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32_t tmargin; -@@ -233,7 +237,7 @@ struct offset { - */ - - struct buffinfo { -- uint32_t size; /* size of this buffer */ -+ size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ - }; - -@@ -810,8 +814,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; -- uint32_t tile_rowsize = TIFFTileRowSize(in); -- uint32_t src_offset, dst_offset; -+ tmsize_t tile_rowsize = TIFFTileRowSize(in); -+ tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t*) buf; - unsigned char *src = NULL; -@@ -861,7 +865,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } -- tilebuf = limitMalloc(tile_buffsize + 3); -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; -@@ -1024,7 +1028,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8_t *obuf, - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; -- tbuff = (unsigned char *)limitMalloc(tilesize + 8); -+ tbuff = (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError ("readSeparateTilesIntoBuffer", -@@ -1217,7 +1221,8 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - -- obuf = limitMalloc (rowstripsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ obuf = limitMalloc (rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - -@@ -1229,7 +1234,7 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); -- memset (obuf, '\0', rowstripsize); -+ memset (obuf, '\0',rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump)) - { - _TIFFfree(obuf); -@@ -1237,10 +1242,15 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { -- dump_info(dump->outfile, dump->format,"", -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } -+ dump_info(dump->outfile, dump->format,"", - "Sample %2d, Strip: %2d, bytes: %4d, Row %4d, bytes: %4d, Input offset: %6d", -- s + 1, strip + 1, stripsize, row + 1, scanlinesize, src - buf); -- dump_buffer(dump->outfile, dump->format, nrows, scanlinesize, row, obuf); -+ s + 1, strip + 1, stripsize, row + 1, (uint32_t)scanlinesize, src - buf); -+ dump_buffer(dump->outfile, dump->format, nrows, (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) -@@ -1267,7 +1277,7 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -- uint32_t tile_rowsize = TIFFTileRowSize(out); -+ tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t* bufp = (uint8_t*) buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); -@@ -1310,9 +1320,11 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - -- tilebuf = limitMalloc(tile_buffsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; -+ memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; -@@ -1358,7 +1370,8 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - uint32_t imagewidth, tsample_t spp, - struct dump_opts * dump) - { -- tdata_t obuf = limitMalloc(TIFFTileSize(out)); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -@@ -1368,6 +1381,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - - if (obuf == NULL) - return 1; -+ memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || -@@ -1793,14 +1807,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - - *opt_offset = '\0'; - /* convert option to lowercase */ -- end = strlen (opt_ptr); -+ end = (unsigned int)strlen (opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ -- end = strlen (opt_offset + 1); -+ end = (unsigned int)strlen (opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int) *(opt_offset + i)); - /* check dump format value */ -@@ -2273,6 +2287,8 @@ main(int argc, char* argv[]) - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ - -+ assert(NUM_BUFF_OVERSIZE_BYTES >= 3); -+ - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); -@@ -3227,13 +3243,13 @@ extractContigSamples32bits (uint8_t *in, uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3642,13 +3658,13 @@ extractContigSamplesShifted32bits (uint8_t *in, uint8_t *out, uint32_t cols, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3825,10 +3841,10 @@ extractContigSamplesToTileBuffer(uint8_t *out, uint8_t *in, uint32_t rows, uint3 - static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - { - uint8_t* bufp = buf; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); -- uint32_t stripsize = TIFFStripSize(in); -- uint32_t rows = 0; -+ tmsize_t stripsize = TIFFStripSize(in); -+ tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - -@@ -3841,11 +3857,11 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) -- TIFFError("", "Strip %"PRIu32": read %"PRId32" bytes, strip size %"PRIu32, -+ TIFFError("", "Strip %"PRIu32": read %"PRId64" bytes, strip size %"PRIu64, - strip + 1, bytes_read, stripsize); - - if (bytes_read < 0 && !ignore) { -- TIFFError("", "Error reading strip %"PRIu32" after %"PRIu32" rows", -+ TIFFError("", "Error reading strip %"PRIu32" after %"PRIu64" rows", - strip, rows); - return 0; - } -@@ -4310,13 +4326,13 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4359,10 +4375,10 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4835,13 +4851,13 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4884,10 +4900,10 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4910,7 +4926,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - { - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; -@@ -4976,7 +4992,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; -- buff = limitMalloc(stripsize + 3); -+ buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError ("readSeparateStripsIntoBuffer", -@@ -4999,7 +5015,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip (in, strip, buff, stripsize); -- rows_this_strip = bytes_read / src_rowsize; -+ rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), -@@ -6062,13 +6078,14 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; -- uint32_t stsize = 0, tlsize = 0, buffsize = 0, scanlinesize = 0; -+ tmsize_t stsize = 0, tlsize = 0, buffsize = 0; -+ tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ -- uint32_t tile_rowsize = 0; -+ tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - unsigned char *new_buff = NULL; - int readunit = 0; -- static uint32_t prev_readsize = 0; -+ static tmsize_t prev_readsize = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); -@@ -6325,6 +6342,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). -+ * Furthermore, functions like extractContigSamplesShifted32bits() -+ * need a buffer, which is at least 3 bytes larger than the actual image. - * Otherwise buffer-overflow might occur there. - */ - buffsize_check = length * (uint32_t)(((width * spp * bps) + 7) / 8); -@@ -6376,7 +6395,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { -@@ -6387,11 +6406,11 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- new_buff = _TIFFrealloc(read_buff, buffsize+3); -+ new_buff = _TIFFrealloc(read_buff, buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (read_buff); -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - read_buff = new_buff; -@@ -6464,8 +6483,13 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - dump_info (dump->infile, dump->format, "", - "Bits per sample %"PRIu16", Samples per pixel %"PRIu16, bps, spp); - -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } - for (i = 0; i < length; i++) -- dump_buffer(dump->infile, dump->format, 1, scanlinesize, -+ dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -@@ -7485,13 +7509,13 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -7554,23 +7578,23 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - - if (!sect_buff) - { -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { -- new_buff = _TIFFrealloc(sect_buff, sectsize); -+ new_buff = _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree (sect_buff); -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; -@@ -7580,7 +7604,7 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -7611,17 +7635,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7634,7 +7658,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - -@@ -7714,17 +7738,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7737,7 +7761,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - -@@ -7853,24 +7877,24 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { -- new_buff = _TIFFrealloc(crop_buff, cropsize); -+ new_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; -@@ -7879,7 +7903,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -8177,13 +8201,13 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -8568,13 +8592,13 @@ rotateContigSamples32bits(uint16_t rotation, uint16_t spp, uint16_t bps, uint32_ - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -8643,12 +8667,13 @@ rotateImage(uint16_t rotation, struct image_data *image, uint32_t *img_width, - return (-1); - } - -- if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) -+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */ -+ if (!(rbuff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { -- TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); -+ TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -- _TIFFmemset(rbuff, '\0', buffsize); -+ _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - - ibuff = *ibuff_ptr; - switch (rotation) -@@ -9176,13 +9201,13 @@ reverseSamples32bits (uint16_t spp, uint16_t bps, uint32_t width, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -9273,12 +9298,13 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - case MIRROR_BOTH: - case MIRROR_VERT: -- line_buff = (unsigned char *)limitMalloc(rowsize); -+ line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { -- TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); -+ TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) -@@ -9310,11 +9336,12 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - } - else - { /* non 8 bit per sample data */ -- if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) -+ if (!(line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) -@@ -9326,7 +9353,7 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - row_offset = row * rowsize; - src = ibuff + row_offset; -- _TIFFmemset (line_buff, '\0', rowsize); -+ _TIFFmemset (line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: if (reverseSamples16bits(spp, bps, width, src, line_buff)) --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0
-86@@ -1,86 +0,0 @@ -CVE: CVE-2022-2953 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Mon, 15 Aug 2022 22:11:03 +0200 -Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?= - =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?= - =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?= - =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?= - =?UTF-8?q?Z=20and=20-z.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - -This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 ---- - tools/tiffcrop.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 90286a5e..c3b758ec 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022"; - #define ROTATECW_270 32 - #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - --#define CROP_NONE 0 --#define CROP_MARGINS 1 --#define CROP_WIDTH 2 --#define CROP_LENGTH 4 --#define CROP_ZONES 8 --#define CROP_REGIONS 16 -+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */ -+#define CROP_MARGINS 1 /* "-m" */ -+#define CROP_WIDTH 2 /* "-X" */ -+#define CROP_LENGTH 4 /* "-Y" */ -+#define CROP_ZONES 8 /* "-Z" */ -+#define CROP_REGIONS 16 /* "-z" */ - #define CROP_ROTATE 32 - #define CROP_MIRROR 64 - #define CROP_INVERT 128 -@@ -316,7 +316,7 @@ struct crop_mask { - #define PAGE_MODE_RESOLUTION 1 - #define PAGE_MODE_PAPERSIZE 2 - #define PAGE_MODE_MARGINS 4 --#define PAGE_MODE_ROWSCOLS 8 -+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - - #define INVERT_DATA_ONLY 10 - #define INVERT_DATA_AND_TAG 11 -@@ -781,7 +781,7 @@ static const char usage_info[] = - " The four debug/dump options are independent, though it makes little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" --"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n" -+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given selection successively.\n" - "\n" - ; -@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - /*NOTREACHED*/ - } - } -- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/ -- char XY, Z, R; -+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ -+ char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); - Z = (crop_data->crop_mode & CROP_ZONES); - R = (crop_data->crop_mode & CROP_REGIONS); -- if ((XY && Z) || (XY && R) || (Z && R)) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit"); -+ S = (page->mode & PAGE_MODE_ROWSCOLS); -+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } - } /* end process_command_opts */ --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0
-32@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0
-39@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4
-14@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175395): https://lists.openembedded.org/g/openembedded-core/message/175395
Mute This Topic: https://lists.openembedded.org/mt/96047877/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 09/77] tiff: update 4.4.0 -> 4.5.0
But that looks like a different problem, in testing, rather than setting up the build.
Alex
Quoted 1,505 lines · Khem Raj
Quoted 6 lines · Alexander Kanavin
The regression seems local to your setup. On poky, gtk4-native builds fine:
Run-time dependency libtiff-4 found: YES 4.5.0
Or it's caused by something else still.
debian folks are also seeing problem
https://www.mail-archive.com/[email protected]/msg1886646.htmlQuoted 1,492 lines
Alex
Quoted 1,488 lines · Khem Raj
This regresses building gtk4-native. meson/configure fails
Found CMake:
/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gtk4-native/4.8.2-r0/recipe-sysroot-native/usr/bin/cmake(3.25.1)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libtiff-4../gtk-4.8.2/meson.build:427:0: ERROR: Automatic wrap-based subproject downloading is disabled
Quoted 1,476 lines · Alexander Kanavin
Drop all CVE backports.
License-Update: formatting
Signed-off-by Alexander Kanavin <[email protected]>--- ...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 ------- ...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 ----- ...fcrop-S-option-Make-decision-simpler.patch | 36 - ...-incompatibility-of-Z-X-Y-z-options-.patch | 59 -- ...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------ .../libtiff/files/CVE-2022-2953.patch | 86 --- .../libtiff/files/CVE-2022-34526.patch | 32 - .../libtiff/files/CVE-2022-3970.patch | 39 -- .../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +- 9 files changed, 4 insertions(+), 1368 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0
-266@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0
-184@@ -1,184 +0,0 @@ -CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001 -From: 4ugustus <[email protected]> -Date: Sat, 11 Jun 2022 09:31:43 +0000 -Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428) - ---- - libtiff/tif_aux.c | 9 +++++++ - libtiff/tiffiop.h | 1 + - tools/tiffcrop.c | 62 ++++++++++++++++++++++++++--------------------- - 3 files changed, 44 insertions(+), 28 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 140f26c7..5b88c8d0 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val ) - return (float)val; - } - -+uint32_t _TIFFClampDoubleToUInt32(double val) -+{ -+ if( val < 0 ) -+ return 0; -+ if( val > 0xFFFFFFFFU || val != val ) -+ return 0xFFFFFFFFU; -+ return (uint32_t)val; -+} -+ - int _TIFFSeekOK(TIFF* tif, toff_t off) - { - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index e3af461d..4e8bdac2 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t); - extern float _TIFFUInt64ToFloat(uint64_t); - - extern float _TIFFClampDoubleToFloat(double); -+extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern tmsize_t - _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip, -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 1f827b2b..90286a5e 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) - { -- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); -- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); -- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); -- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); - } - else - { -- x1 = (uint32_t) (crop->corners[i].X1); -- x2 = (uint32_t) (crop->corners[i].X2); -- y1 = (uint32_t) (crop->corners[i].Y1); -- y2 = (uint32_t) (crop->corners[i].Y2); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to bottom-right. -@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ -- tmargin = (uint32_t)(crop->margins[0]); -- lmargin = (uint32_t)(crop->margins[1]); -- bmargin = (uint32_t)(crop->margins[2]); -- rmargin = (uint32_t)(crop->margins[3]); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ -- tmargin = (uint32_t)(crop->margins[0] * scale * yres); -- lmargin = (uint32_t)(crop->margins[1] * scale * xres); -- bmargin = (uint32_t)(crop->margins[2] * scale * yres); -- rmargin = (uint32_t)(crop->margins[3] * scale * xres); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if ((lmargin + rmargin) > image->width) -@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)crop->width; -+ width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)crop->length; -+ length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)(crop->width * scale * image->xres); -+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)(crop->length * scale * image->yres); -+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } -@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ -- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ -- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8)); - } - - if ((hmargin * 2.0) > (pwidth * page->hres)) -@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->mode & PAGE_MODE_PAPERSIZE ) - { -- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2)); -- olength = (uint32_t)((plength * page->vres) - (vmargin * 2)); -+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); -+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2)); - } - else - { -- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres)); -- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres)); -+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); -+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - -@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - if (olength > ilength) - olength = ilength; - -+ if (owidth == 0 || olength == 0) -+ { -+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages"); -+ exit(EXIT_FAILURE); -+ } -+ - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0
-36@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0
-59@@ -1,59 +0,0 @@ -CVE: CVE-2022-3597 CVE-2022-3626 CVE-2022-3627 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 4746f16253b784287bc8a5003990c1c3b9a03a62 Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Thu, 25 Aug 2022 16:11:41 +0200 -Subject: [PATCH] tiffcrop: disable incompatibility of -Z, -X, -Y, -z options - with any PAGE_MODE_x option (fixes #411 and #413) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - -Code analysis: - -With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. -In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - -Execution of the else-clause often leads to buffer-overflows. - -Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - -The MR solves issues #411 and #413. ---- - doc/tools/tiffcrop.rst | 8 ++++++++ - tools/tiffcrop.c | 32 +++++++++++++++++++++++++------- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 8fd856dc..41a2ea36 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2138,9 +2143,20 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } -+ -+ /* Check for not allowed combination: -+ * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -+ * such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. -+. */ -+ if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) { -+ TIFFError("tiffcrop input error", -+ "Any of the crop options -X, -Y, -Z and -z together with other PAGE_MODE_x options such as - H, -V, -P, -J or -K is not supported and may cause buffer overflows..->exit"); -+ exit(EXIT_FAILURE); -+ } -+ - } /* end process_command_opts */ - - /* Start a new output file if one has not been previously opened or --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0
-653@@ -1,653 +0,0 @@ -CVE: CVE-2022-3570 CVE-2022-3598 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From afd7086090dafd3949afd172822cbcec4ed17d56 Mon Sep 17 00:00:00 2001 -From: Su Laus <[email protected]> -Date: Thu, 13 Oct 2022 14:33:27 +0000 -Subject: [PATCH] tiffcrop subroutines require a larger buffer (fixes #271, - #381, #386, #388, #389, #435) - ---- - tools/tiffcrop.c | 209 ++++++++++++++++++++++++++--------------------- - 1 file changed, 118 insertions(+), 91 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 41a2ea36..deab5feb 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -212,6 +212,10 @@ static char tiffcrop_rev_date[] = "26-08-2022"; - - #define TIFF_DIR_MAX 65534 - -+/* Some conversion subroutines require image buffers, which are at least 3 bytes -+ * larger than the necessary size for the image itself. */ -+#define NUM_BUFF_OVERSIZE_BYTES 3 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32_t tmargin; -@@ -233,7 +237,7 @@ struct offset { - */ - - struct buffinfo { -- uint32_t size; /* size of this buffer */ -+ size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ - }; - -@@ -810,8 +814,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; -- uint32_t tile_rowsize = TIFFTileRowSize(in); -- uint32_t src_offset, dst_offset; -+ tmsize_t tile_rowsize = TIFFTileRowSize(in); -+ tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t*) buf; - unsigned char *src = NULL; -@@ -861,7 +865,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } -- tilebuf = limitMalloc(tile_buffsize + 3); -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; -@@ -1024,7 +1028,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8_t *obuf, - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; -- tbuff = (unsigned char *)limitMalloc(tilesize + 8); -+ tbuff = (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError ("readSeparateTilesIntoBuffer", -@@ -1217,7 +1221,8 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - -- obuf = limitMalloc (rowstripsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ obuf = limitMalloc (rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - -@@ -1229,7 +1234,7 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); -- memset (obuf, '\0', rowstripsize); -+ memset (obuf, '\0',rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump)) - { - _TIFFfree(obuf); -@@ -1237,10 +1242,15 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { -- dump_info(dump->outfile, dump->format,"", -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } -+ dump_info(dump->outfile, dump->format,"", - "Sample %2d, Strip: %2d, bytes: %4d, Row %4d, bytes: %4d, Input offset: %6d", -- s + 1, strip + 1, stripsize, row + 1, scanlinesize, src - buf); -- dump_buffer(dump->outfile, dump->format, nrows, scanlinesize, row, obuf); -+ s + 1, strip + 1, stripsize, row + 1, (uint32_t)scanlinesize, src - buf); -+ dump_buffer(dump->outfile, dump->format, nrows, (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) -@@ -1267,7 +1277,7 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -- uint32_t tile_rowsize = TIFFTileRowSize(out); -+ tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t* bufp = (uint8_t*) buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); -@@ -1310,9 +1320,11 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - -- tilebuf = limitMalloc(tile_buffsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; -+ memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; -@@ -1358,7 +1370,8 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - uint32_t imagewidth, tsample_t spp, - struct dump_opts * dump) - { -- tdata_t obuf = limitMalloc(TIFFTileSize(out)); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -@@ -1368,6 +1381,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - - if (obuf == NULL) - return 1; -+ memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || -@@ -1793,14 +1807,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - - *opt_offset = '\0'; - /* convert option to lowercase */ -- end = strlen (opt_ptr); -+ end = (unsigned int)strlen (opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ -- end = strlen (opt_offset + 1); -+ end = (unsigned int)strlen (opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int) *(opt_offset + i)); - /* check dump format value */ -@@ -2273,6 +2287,8 @@ main(int argc, char* argv[]) - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ - -+ assert(NUM_BUFF_OVERSIZE_BYTES >= 3); -+ - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); -@@ -3227,13 +3243,13 @@ extractContigSamples32bits (uint8_t *in, uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3642,13 +3658,13 @@ extractContigSamplesShifted32bits (uint8_t *in, uint8_t *out, uint32_t cols, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3825,10 +3841,10 @@ extractContigSamplesToTileBuffer(uint8_t *out, uint8_t *in, uint32_t rows, uint3 - static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - { - uint8_t* bufp = buf; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); -- uint32_t stripsize = TIFFStripSize(in); -- uint32_t rows = 0; -+ tmsize_t stripsize = TIFFStripSize(in); -+ tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - -@@ -3841,11 +3857,11 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) -- TIFFError("", "Strip %"PRIu32": read %"PRId32" bytes, strip size %"PRIu32, -+ TIFFError("", "Strip %"PRIu32": read %"PRId64" bytes, strip size %"PRIu64, - strip + 1, bytes_read, stripsize); - - if (bytes_read < 0 && !ignore) { -- TIFFError("", "Error reading strip %"PRIu32" after %"PRIu32" rows", -+ TIFFError("", "Error reading strip %"PRIu32" after %"PRIu64" rows", - strip, rows); - return 0; - } -@@ -4310,13 +4326,13 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4359,10 +4375,10 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4835,13 +4851,13 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4884,10 +4900,10 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4910,7 +4926,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - { - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; -@@ -4976,7 +4992,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; -- buff = limitMalloc(stripsize + 3); -+ buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError ("readSeparateStripsIntoBuffer", -@@ -4999,7 +5015,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip (in, strip, buff, stripsize); -- rows_this_strip = bytes_read / src_rowsize; -+ rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), -@@ -6062,13 +6078,14 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; -- uint32_t stsize = 0, tlsize = 0, buffsize = 0, scanlinesize = 0; -+ tmsize_t stsize = 0, tlsize = 0, buffsize = 0; -+ tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ -- uint32_t tile_rowsize = 0; -+ tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - unsigned char *new_buff = NULL; - int readunit = 0; -- static uint32_t prev_readsize = 0; -+ static tmsize_t prev_readsize = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); -@@ -6325,6 +6342,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). -+ * Furthermore, functions like extractContigSamplesShifted32bits() -+ * need a buffer, which is at least 3 bytes larger than the actual image. - * Otherwise buffer-overflow might occur there. - */ - buffsize_check = length * (uint32_t)(((width * spp * bps) + 7) / 8); -@@ -6376,7 +6395,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { -@@ -6387,11 +6406,11 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- new_buff = _TIFFrealloc(read_buff, buffsize+3); -+ new_buff = _TIFFrealloc(read_buff, buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (read_buff); -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - read_buff = new_buff; -@@ -6464,8 +6483,13 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - dump_info (dump->infile, dump->format, "", - "Bits per sample %"PRIu16", Samples per pixel %"PRIu16, bps, spp); - -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } - for (i = 0; i < length; i++) -- dump_buffer(dump->infile, dump->format, 1, scanlinesize, -+ dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -@@ -7485,13 +7509,13 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -7554,23 +7578,23 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - - if (!sect_buff) - { -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { -- new_buff = _TIFFrealloc(sect_buff, sectsize); -+ new_buff = _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree (sect_buff); -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; -@@ -7580,7 +7604,7 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -7611,17 +7635,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7634,7 +7658,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - -@@ -7714,17 +7738,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7737,7 +7761,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - -@@ -7853,24 +7877,24 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { -- new_buff = _TIFFrealloc(crop_buff, cropsize); -+ new_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; -@@ -7879,7 +7903,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -8177,13 +8201,13 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -8568,13 +8592,13 @@ rotateContigSamples32bits(uint16_t rotation, uint16_t spp, uint16_t bps, uint32_ - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -8643,12 +8667,13 @@ rotateImage(uint16_t rotation, struct image_data *image, uint32_t *img_width, - return (-1); - } - -- if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) -+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */ -+ if (!(rbuff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { -- TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); -+ TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -- _TIFFmemset(rbuff, '\0', buffsize); -+ _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - - ibuff = *ibuff_ptr; - switch (rotation) -@@ -9176,13 +9201,13 @@ reverseSamples32bits (uint16_t spp, uint16_t bps, uint32_t width, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -9273,12 +9298,13 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - case MIRROR_BOTH: - case MIRROR_VERT: -- line_buff = (unsigned char *)limitMalloc(rowsize); -+ line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { -- TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); -+ TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) -@@ -9310,11 +9336,12 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - } - else - { /* non 8 bit per sample data */ -- if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) -+ if (!(line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) -@@ -9326,7 +9353,7 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - row_offset = row * rowsize; - src = ibuff + row_offset; -- _TIFFmemset (line_buff, '\0', rowsize); -+ _TIFFmemset (line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: if (reverseSamples16bits(spp, bps, width, src, line_buff)) --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0
-86@@ -1,86 +0,0 @@ -CVE: CVE-2022-2953 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Mon, 15 Aug 2022 22:11:03 +0200 -Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?= - =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?= - =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?= - =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?= - =?UTF-8?q?Z=20and=20-z.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - -This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 ---- - tools/tiffcrop.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 90286a5e..c3b758ec 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022"; - #define ROTATECW_270 32 - #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - --#define CROP_NONE 0 --#define CROP_MARGINS 1 --#define CROP_WIDTH 2 --#define CROP_LENGTH 4 --#define CROP_ZONES 8 --#define CROP_REGIONS 16 -+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */ -+#define CROP_MARGINS 1 /* "-m" */ -+#define CROP_WIDTH 2 /* "-X" */ -+#define CROP_LENGTH 4 /* "-Y" */ -+#define CROP_ZONES 8 /* "-Z" */ -+#define CROP_REGIONS 16 /* "-z" */ - #define CROP_ROTATE 32 - #define CROP_MIRROR 64 - #define CROP_INVERT 128 -@@ -316,7 +316,7 @@ struct crop_mask { - #define PAGE_MODE_RESOLUTION 1 - #define PAGE_MODE_PAPERSIZE 2 - #define PAGE_MODE_MARGINS 4 --#define PAGE_MODE_ROWSCOLS 8 -+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - - #define INVERT_DATA_ONLY 10 - #define INVERT_DATA_AND_TAG 11 -@@ -781,7 +781,7 @@ static const char usage_info[] = - " The four debug/dump options are independent, though it makes little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" --"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n" -+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given selection successively.\n" - "\n" - ; -@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - /*NOTREACHED*/ - } - } -- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/ -- char XY, Z, R; -+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ -+ char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); - Z = (crop_data->crop_mode & CROP_ZONES); - R = (crop_data->crop_mode & CROP_REGIONS); -- if ((XY && Z) || (XY && R) || (Z && R)) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit"); -+ S = (page->mode & PAGE_MODE_ROWSCOLS); -+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } - } /* end process_command_opts */ --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0
-32@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0
-39@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4
-14@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175395): https://lists.openembedded.org/g/openembedded-core/message/175395
Mute This Topic: https://lists.openembedded.org/mt/96047877/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 09/77] tiff: update 4.4.0 -> 4.5.0
In reply to Alexander KanavinQuoted 2 lines · Alexander Kanavin
The regression seems local to your setup. On poky, gtk4-native builds fine:
I am building poky. However, the build hosts leak is happening in this version of tiff-native
because it has started to assert dependencies in .pc files see
https://gitlab.com/libtiff/libtiff/-/commit/2c496078ade4a66b69b35cb97dc994000a23d6a7
since my build host has libwebp installed and perhaps your doesnt, you turned out to be lucky.
because it detects libwebp from build host for native builds and emits it into Requires.private: section of libtiff-4.pc file.
Subsequently when a native build of a package ( e.g. gtk4-native ) needs libtiff and it tries to detect it via pkgconfig it fails to find all needed dependencies
and hence the check fails.
a simple patch to fix is to add a packageconfig for webp support, which can add needed native dependency on libwebp-native when enabled
Quoted 1,496 lines
Run-time dependency libtiff-4 found: YES 4.5.0
Or it's caused by something else still.
Alex
Quoted 1,488 lines · Khem Raj
This regresses building gtk4-native. meson/configure fails
Found CMake:
/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gtk4-native/4.8.2-r0/recipe-sysroot-native/usr/bin/cmake(3.25.1)
Run-time dependency libtiff-4 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libtiff-4../gtk-4.8.2/meson.build:427:0: ERROR: Automatic wrap-based subproject downloading is disabled
Quoted 1,476 lines · Alexander Kanavin
Drop all CVE backports.
License-Update: formatting
Signed-off-by Alexander Kanavin <[email protected]>--- ...-of-TIFFTAG_INKNAMES-and-related-TIF.patch | 266 ------- ...-the-FPE-in-tiffcrop-415-427-and-428.patch | 184 ----- ...fcrop-S-option-Make-decision-simpler.patch | 36 - ...-incompatibility-of-Z-X-Y-z-options-.patch | 59 -- ...ines-require-a-larger-buffer-fixes-2.patch | 653 ------------------ .../libtiff/files/CVE-2022-2953.patch | 86 --- .../libtiff/files/CVE-2022-34526.patch | 32 - .../libtiff/files/CVE-2022-3970.patch | 39 -- .../libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} | 17 +- 9 files changed, 4 insertions(+), 1368 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch rename meta/recipes-multimedia/libtiff/{tiff_4.4.0.bb => tiff_4.5.0.bb} (75%)meta/recipes-multimedia/libtiff/files/0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch deleted +0
-266@@ -1,266 +0,0 @@ -CVE: CVE-2022-3599 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From f00484b9519df933723deb38fff943dc291a793d Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Tue, 30 Aug 2022 16:56:48 +0200 -Subject: [PATCH] Revised handling of TIFFTAG_INKNAMES and related - TIFFTAG_NUMBEROFINKS value - -In order to solve the buffer overflow issues related to TIFFTAG_INKNAMES and related TIFFTAG_NUMBEROFINKS value, a revised handling of those tags within LibTiff is proposed: - -Behaviour for writing: - `NumberOfInks` MUST fit to the number of inks in the `InkNames` string. - `NumberOfInks` is automatically set when `InkNames` is set. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -Behaviour for reading: - When reading `InkNames` from a TIFF file, the `NumberOfInks` will be set automatically to the number of inks in `InkNames` string. - If `NumberOfInks` is different to the number of inks within `InkNames` string, that will be corrected and a warning is issued. - If `NumberOfInks` is not equal to samplesperpixel only a warning will be issued. - -This allows the safe use of the NumberOfInks value to read out the InkNames without buffer overflow - -This MR will close the following issues: #149, #150, #152, #168 (to be checked), #250, #269, #398 and #456. - -It also fixes the old bug at http://bugzilla.maptools.org/show_bug.cgi?id=2599, for which the limitation of `NumberOfInks = SPP` was introduced, which is in my opinion not necessary and does not solve the general issue. ---- - libtiff/tif_dir.c | 119 ++++++++++++++++++++++++----------------- - libtiff/tif_dir.h | 2 + - libtiff/tif_dirinfo.c | 2 +- - libtiff/tif_dirwrite.c | 5 ++ - libtiff/tif_print.c | 4 ++ - 5 files changed, 82 insertions(+), 50 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index 793e8a79..816f7756 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -136,32 +136,30 @@ setExtraSamples(TIFF* tif, va_list ap, uint32_t* v) - } - - /* -- * Confirm we have "samplesperpixel" ink names separated by \0. Returns -+ * Count ink names separated by \0. Returns - * zero if the ink names are not as expected. - */ --static uint32_t --checkInkNamesString(TIFF* tif, uint32_t slen, const char* s) -+static uint16_t -+countInkNamesString(TIFF *tif, uint32_t slen, const char *s) - { -- TIFFDirectory* td = &tif->tif_dir; -- uint16_t i = td->td_samplesperpixel; -+ uint16_t i = 0; -+ const char *ep = s + slen; -+ const char *cp = s; - - if (slen > 0) { -- const char* ep = s+slen; -- const char* cp = s; -- for (; i > 0; i--) { -+ do { - for (; cp < ep && *cp != '\0'; cp++) {} - if (cp >= ep) - goto bad; - cp++; /* skip \0 */ -- } -- return ((uint32_t)(cp - s)); -+ i++; -+ } while (cp < ep); -+ return (i); - } - bad: - TIFFErrorExt(tif->tif_clientdata, "TIFFSetField", -- "%s: Invalid InkNames value; expecting %"PRIu16" names, found %"PRIu16, -- tif->tif_name, -- td->td_samplesperpixel, -- (uint16_t)(td->td_samplesperpixel-i)); -+ "%s: Invalid InkNames value; no NUL at given buffer end location %"PRIu32", after %"PRIu16" ink", -+ tif->tif_name, slen, i); - return (0); - } - -@@ -478,13 +476,61 @@ _TIFFVSetField(TIFF* tif, uint32_t tag, va_list ap) - _TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6); - break; - case TIFFTAG_INKNAMES: -- v = (uint16_t) va_arg(ap, uint16_vap); -- s = va_arg(ap, char*); -- v = checkInkNamesString(tif, v, s); -- status = v > 0; -- if( v > 0 ) { -- _TIFFsetNString(&td->td_inknames, s, v); -- td->td_inknameslen = v; -+ { -+ v = (uint16_t) va_arg(ap, uint16_vap); -+ s = va_arg(ap, char*); -+ uint16_t ninksinstring; -+ ninksinstring = countInkNamesString(tif, v, s); -+ status = ninksinstring > 0; -+ if(ninksinstring > 0 ) { -+ _TIFFsetNString(&td->td_inknames, s, v); -+ td->td_inknameslen = v; -+ /* Set NumberOfInks to the value ninksinstring */ -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (td->td_numberofinks != ninksinstring) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the number of inks %"PRIu16".\n -> NumberOfInks value adapted to %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, ninksinstring, ninksinstring); -+ td->td_numberofinks = ninksinstring; -+ } -+ } else { -+ td->td_numberofinks = ninksinstring; -+ TIFFSetFieldBit(tif, FIELD_NUMBEROFINKS); -+ } -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu16" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, td->td_numberofinks, td->td_samplesperpixel); -+ } -+ } -+ } -+ } -+ break; -+ case TIFFTAG_NUMBEROFINKS: -+ v = (uint16_t)va_arg(ap, uint16_vap); -+ /* If InkNames already set also NumberOfInks is set accordingly and should be equal */ -+ if (TIFFFieldSet(tif, FIELD_INKNAMES)) -+ { -+ if (v != td->td_numberofinks) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Error %s; Tag %s:\n It is not possible to set the value %"PRIu32" for NumberOfInks\n which is different from the number of inks in the InkNames tag (%"PRIu16")", -+ tif->tif_name, fip->field_name, v, td->td_numberofinks); -+ /* Do not set / overwrite number of inks already set by InkNames case accordingly. */ -+ status = 0; -+ } -+ } else { -+ td->td_numberofinks = (uint16_t)v; -+ if (TIFFFieldSet(tif, FIELD_SAMPLESPERPIXEL)) -+ { -+ if (td->td_numberofinks != td->td_samplesperpixel) { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Warning %s; Tag %s:\n Value %"PRIu32" of NumberOfInks is different from the SamplesPerPixel value %"PRIu16"", -+ tif->tif_name, fip->field_name, v, td->td_samplesperpixel); -+ } -+ } - } - break; - case TIFFTAG_PERSAMPLE: -@@ -986,34 +1032,6 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - if (fip->field_bit == FIELD_CUSTOM) { - standard_tag = 0; - } -- -- if( standard_tag == TIFFTAG_NUMBEROFINKS ) -- { -- int i; -- for (i = 0; i < td->td_customValueCount; i++) { -- uint16_t val; -- TIFFTagValue *tv = td->td_customValues + i; -- if (tv->info->field_tag != standard_tag) -- continue; -- if( tv->value == NULL ) -- return 0; -- val = *(uint16_t *)tv->value; -- /* Truncate to SamplesPerPixel, since the */ -- /* setting code for INKNAMES assume that there are SamplesPerPixel */ -- /* inknames. */ -- /* Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2599 */ -- if( val > td->td_samplesperpixel ) -- { -- TIFFWarningExt(tif->tif_clientdata,"_TIFFVGetField", -- "Truncating NumberOfInks from %u to %"PRIu16, -- val, td->td_samplesperpixel); -- val = td->td_samplesperpixel; -- } -- *va_arg(ap, uint16_t*) = val; -- return 1; -- } -- return 0; -- } - - switch (standard_tag) { - case TIFFTAG_SUBFILETYPE: -@@ -1195,6 +1213,9 @@ _TIFFVGetField(TIFF* tif, uint32_t tag, va_list ap) - case TIFFTAG_INKNAMES: - *va_arg(ap, const char**) = td->td_inknames; - break; -+ case TIFFTAG_NUMBEROFINKS: -+ *va_arg(ap, uint16_t *) = td->td_numberofinks; -+ break; - default: - { - int i; -diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h -index 09065648..0c251c9e 100644 ---- a/libtiff/tif_dir.h -+++ b/libtiff/tif_dir.h -@@ -117,6 +117,7 @@ typedef struct { - /* CMYK parameters */ - int td_inknameslen; - char* td_inknames; -+ uint16_t td_numberofinks; /* number of inks in InkNames string */ - - int td_customValueCount; - TIFFTagValue *td_customValues; -@@ -174,6 +175,7 @@ typedef struct { - #define FIELD_TRANSFERFUNCTION 44 - #define FIELD_INKNAMES 46 - #define FIELD_SUBIFD 49 -+#define FIELD_NUMBEROFINKS 50 - /* FIELD_CUSTOM (see tiffio.h) 65 */ - /* end of support for well-known tags; codec-private tags follow */ - #define FIELD_CODEC 66 /* base of codec-private tags */ -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index 3371cb5c..3b4bcd33 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -114,7 +114,7 @@ tiffFields[] = { - { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray }, - { TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL }, - { TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL }, -- { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL }, -+ { TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_NUMBEROFINKS, 1, 0, "NumberOfInks", NULL }, - { TIFFTAG_DOTRANGE, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_UINT16_PAIR, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "DotRange", NULL }, - { TIFFTAG_TARGETPRINTER, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "TargetPrinter", NULL }, - { TIFFTAG_EXTRASAMPLES, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_EXTRASAMPLES, 0, 1, "ExtraSamples", NULL }, -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 6c86fdca..062e4610 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -626,6 +626,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64_t* pdiroff) - if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,TIFFTAG_INKNAMES,tif->tif_dir.td_inknameslen,tif->tif_dir.td_inknames)) - goto bad; - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) -+ { -+ if (!TIFFWriteDirectoryTagShort(tif, &ndir, dir, TIFFTAG_NUMBEROFINKS, tif->tif_dir.td_numberofinks)) -+ goto bad; -+ } - if (TIFFFieldSet(tif,FIELD_SUBIFD)) - { - if (!TIFFWriteDirectoryTagSubifd(tif,&ndir,dir)) -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 16ce5780..a91b9e7b 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -397,6 +397,10 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - } - fputs("\n", fd); - } -+ if (TIFFFieldSet(tif, FIELD_NUMBEROFINKS)) { -+ fprintf(fd, " NumberOfInks: %d\n", -+ td->td_numberofinks); -+ } - if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) { - fprintf(fd, " Thresholding: "); - switch (td->td_threshholding) { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch deleted +0
-184@@ -1,184 +0,0 @@ -CVE: CVE-2022-2056 CVE-2022-2057 CVE-2022-2058 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 22a205da86ca2d038d0066e1d70752d117258fb4 Mon Sep 17 00:00:00 2001 -From: 4ugustus <[email protected]> -Date: Sat, 11 Jun 2022 09:31:43 +0000 -Subject: [PATCH] fix the FPE in tiffcrop (#415, #427, and #428) - ---- - libtiff/tif_aux.c | 9 +++++++ - libtiff/tiffiop.h | 1 + - tools/tiffcrop.c | 62 ++++++++++++++++++++++++++--------------------- - 3 files changed, 44 insertions(+), 28 deletions(-) - -diff --git a/libtiff/tif_aux.c b/libtiff/tif_aux.c -index 140f26c7..5b88c8d0 100644 ---- a/libtiff/tif_aux.c -+++ b/libtiff/tif_aux.c -@@ -402,6 +402,15 @@ float _TIFFClampDoubleToFloat( double val ) - return (float)val; - } - -+uint32_t _TIFFClampDoubleToUInt32(double val) -+{ -+ if( val < 0 ) -+ return 0; -+ if( val > 0xFFFFFFFFU || val != val ) -+ return 0xFFFFFFFFU; -+ return (uint32_t)val; -+} -+ - int _TIFFSeekOK(TIFF* tif, toff_t off) - { - /* Huge offsets, especially -1 / UINT64_MAX, can cause issues */ -diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h -index e3af461d..4e8bdac2 100644 ---- a/libtiff/tiffiop.h -+++ b/libtiff/tiffiop.h -@@ -365,6 +365,7 @@ extern double _TIFFUInt64ToDouble(uint64_t); - extern float _TIFFUInt64ToFloat(uint64_t); - - extern float _TIFFClampDoubleToFloat(double); -+extern uint32_t _TIFFClampDoubleToUInt32(double); - - extern tmsize_t - _TIFFReadEncodedStripAndAllocBuffer(TIFF* tif, uint32_t strip, -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 1f827b2b..90286a5e 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -5268,17 +5268,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if ((crop->res_unit == RESUNIT_INCH) || (crop->res_unit == RESUNIT_CENTIMETER)) - { -- x1 = (uint32_t) (crop->corners[i].X1 * scale * xres); -- x2 = (uint32_t) (crop->corners[i].X2 * scale * xres); -- y1 = (uint32_t) (crop->corners[i].Y1 * scale * yres); -- y2 = (uint32_t) (crop->corners[i].Y2 * scale * yres); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1 * scale * xres); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2 * scale * xres); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1 * scale * yres); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2 * scale * yres); - } - else - { -- x1 = (uint32_t) (crop->corners[i].X1); -- x2 = (uint32_t) (crop->corners[i].X2); -- y1 = (uint32_t) (crop->corners[i].Y1); -- y2 = (uint32_t) (crop->corners[i].Y2); -+ x1 = _TIFFClampDoubleToUInt32(crop->corners[i].X1); -+ x2 = _TIFFClampDoubleToUInt32(crop->corners[i].X2); -+ y1 = _TIFFClampDoubleToUInt32(crop->corners[i].Y1); -+ y2 = _TIFFClampDoubleToUInt32(crop->corners[i].Y2); - } - /* a) Region needs to be within image sizes 0.. width-1; 0..length-1 - * b) Corners are expected to be submitted as top-left to bottom-right. -@@ -5357,17 +5357,17 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - { - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { /* User has specified pixels as reference unit */ -- tmargin = (uint32_t)(crop->margins[0]); -- lmargin = (uint32_t)(crop->margins[1]); -- bmargin = (uint32_t)(crop->margins[2]); -- rmargin = (uint32_t)(crop->margins[3]); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0]); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1]); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2]); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3]); - } - else - { /* inches or centimeters specified */ -- tmargin = (uint32_t)(crop->margins[0] * scale * yres); -- lmargin = (uint32_t)(crop->margins[1] * scale * xres); -- bmargin = (uint32_t)(crop->margins[2] * scale * yres); -- rmargin = (uint32_t)(crop->margins[3] * scale * xres); -+ tmargin = _TIFFClampDoubleToUInt32(crop->margins[0] * scale * yres); -+ lmargin = _TIFFClampDoubleToUInt32(crop->margins[1] * scale * xres); -+ bmargin = _TIFFClampDoubleToUInt32(crop->margins[2] * scale * yres); -+ rmargin = _TIFFClampDoubleToUInt32(crop->margins[3] * scale * xres); - } - - if ((lmargin + rmargin) > image->width) -@@ -5397,24 +5397,24 @@ computeInputPixelOffsets(struct crop_mask *crop, struct image_data *image, - if (crop->res_unit != RESUNIT_INCH && crop->res_unit != RESUNIT_CENTIMETER) - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)crop->width; -+ width = _TIFFClampDoubleToUInt32(crop->width); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)crop->length; -+ length = _TIFFClampDoubleToUInt32(crop->length); - else - length = image->length - tmargin - bmargin; - } - else - { - if (crop->crop_mode & CROP_WIDTH) -- width = (uint32_t)(crop->width * scale * image->xres); -+ width = _TIFFClampDoubleToUInt32(crop->width * scale * image->xres); - else - width = image->width - lmargin - rmargin; - - if (crop->crop_mode & CROP_LENGTH) -- length = (uint32_t)(crop->length * scale * image->yres); -+ length = _TIFFClampDoubleToUInt32(crop->length * scale * image->yres); - else - length = image->length - tmargin - bmargin; - } -@@ -5868,13 +5868,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->res_unit == RESUNIT_INCH || page->res_unit == RESUNIT_CENTIMETER) - { /* inches or centimeters specified */ -- hmargin = (uint32_t)(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * page->hres * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * page->vres * ((image->bps + 7) / 8)); - } - else - { /* Otherwise user has specified pixels as reference unit */ -- hmargin = (uint32_t)(page->hmargin * scale * ((image->bps + 7) / 8)); -- vmargin = (uint32_t)(page->vmargin * scale * ((image->bps + 7) / 8)); -+ hmargin = _TIFFClampDoubleToUInt32(page->hmargin * scale * ((image->bps + 7) / 8)); -+ vmargin = _TIFFClampDoubleToUInt32(page->vmargin * scale * ((image->bps + 7) / 8)); - } - - if ((hmargin * 2.0) > (pwidth * page->hres)) -@@ -5912,13 +5912,13 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - { - if (page->mode & PAGE_MODE_PAPERSIZE ) - { -- owidth = (uint32_t)((pwidth * page->hres) - (hmargin * 2)); -- olength = (uint32_t)((plength * page->vres) - (vmargin * 2)); -+ owidth = _TIFFClampDoubleToUInt32((pwidth * page->hres) - (hmargin * 2)); -+ olength = _TIFFClampDoubleToUInt32((plength * page->vres) - (vmargin * 2)); - } - else - { -- owidth = (uint32_t)(iwidth - (hmargin * 2 * page->hres)); -- olength = (uint32_t)(ilength - (vmargin * 2 * page->vres)); -+ owidth = _TIFFClampDoubleToUInt32(iwidth - (hmargin * 2 * page->hres)); -+ olength = _TIFFClampDoubleToUInt32(ilength - (vmargin * 2 * page->vres)); - } - } - -@@ -5927,6 +5927,12 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image, - if (olength > ilength) - olength = ilength; - -+ if (owidth == 0 || olength == 0) -+ { -+ TIFFError("computeOutputPixelOffsets", "Integer overflow when calculating the number of pages"); -+ exit(EXIT_FAILURE); -+ } -+ - /* Compute the number of pages required for Portrait or Landscape */ - switch (page->orient) - { --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-S-option-Make-decision-simpler.patch deleted +0
-36@@ -1,36 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From bad48e90b410df32172006c7876da449ba62cdba Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Sat, 20 Aug 2022 23:35:26 +0200 -Subject: [PATCH] tiffcrop -S option: Make decision simpler. - ---- - tools/tiffcrop.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c3b758ec..8fd856dc 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2133,11 +2133,11 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - } - /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ - char XY, Z, R, S; -- XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); -- Z = (crop_data->crop_mode & CROP_ZONES); -- R = (crop_data->crop_mode & CROP_REGIONS); -- S = (page->mode & PAGE_MODE_ROWSCOLS); -- if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)) ? 1 : 0; -+ Z = (crop_data->crop_mode & CROP_ZONES) ? 1 : 0; -+ R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; -+ S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; -+ if (XY + Z + R + S > 1) { - TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch deleted +0
-59@@ -1,59 +0,0 @@ -CVE: CVE-2022-3597 CVE-2022-3626 CVE-2022-3627 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 4746f16253b784287bc8a5003990c1c3b9a03a62 Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Thu, 25 Aug 2022 16:11:41 +0200 -Subject: [PATCH] tiffcrop: disable incompatibility of -Z, -X, -Y, -z options - with any PAGE_MODE_x option (fixes #411 and #413) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -tiffcrop does not support –Z, -z, -X and –Y options together with any other PAGE_MODE_x options like -H, -V, -P, -J, -K or –S. - -Code analysis: - -With the options –Z, -z, the crop.selections are set to a value > 0. Within main(), this triggers the call of processCropSelections(), which copies the sections from the read_buff into seg_buffs[]. -In the following code in main(), the only supported step, where that seg_buffs are further handled are within an if-clause with if (page.mode == PAGE_MODE_NONE) . - -Execution of the else-clause often leads to buffer-overflows. - -Therefore, the above option combination is not supported and will be disabled to prevent those buffer-overflows. - -The MR solves issues #411 and #413. ---- - doc/tools/tiffcrop.rst | 8 ++++++++ - tools/tiffcrop.c | 32 +++++++++++++++++++++++++------- - 2 files changed, 33 insertions(+), 7 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 8fd856dc..41a2ea36 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -2138,9 +2143,20 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - R = (crop_data->crop_mode & CROP_REGIONS) ? 1 : 0; - S = (page->mode & PAGE_MODE_ROWSCOLS) ? 1 : 0; - if (XY + Z + R + S > 1) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->exit"); - exit(EXIT_FAILURE); - } -+ -+ /* Check for not allowed combination: -+ * Any of the -X, -Y, -Z and -z options together with other PAGE_MODE_x options -+ * such as -H, -V, -P, -J or -K are not supported and may cause buffer overflows. -+. */ -+ if ((XY + Z + R > 0) && page->mode != PAGE_MODE_NONE) { -+ TIFFError("tiffcrop input error", -+ "Any of the crop options -X, -Y, -Z and -z together with other PAGE_MODE_x options such as - H, -V, -P, -J or -K is not supported and may cause buffer overflows..->exit"); -+ exit(EXIT_FAILURE); -+ } -+ - } /* end process_command_opts */ - - /* Start a new output file if one has not been previously opened or --- -2.34.1 -meta/recipes-multimedia/libtiff/files/0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch deleted +0
-653@@ -1,653 +0,0 @@ -CVE: CVE-2022-3570 CVE-2022-3598 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From afd7086090dafd3949afd172822cbcec4ed17d56 Mon Sep 17 00:00:00 2001 -From: Su Laus <[email protected]> -Date: Thu, 13 Oct 2022 14:33:27 +0000 -Subject: [PATCH] tiffcrop subroutines require a larger buffer (fixes #271, - #381, #386, #388, #389, #435) - ---- - tools/tiffcrop.c | 209 ++++++++++++++++++++++++++--------------------- - 1 file changed, 118 insertions(+), 91 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 41a2ea36..deab5feb 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -212,6 +212,10 @@ static char tiffcrop_rev_date[] = "26-08-2022"; - - #define TIFF_DIR_MAX 65534 - -+/* Some conversion subroutines require image buffers, which are at least 3 bytes -+ * larger than the necessary size for the image itself. */ -+#define NUM_BUFF_OVERSIZE_BYTES 3 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32_t tmargin; -@@ -233,7 +237,7 @@ struct offset { - */ - - struct buffinfo { -- uint32_t size; /* size of this buffer */ -+ size_t size; /* size of this buffer */ - unsigned char *buffer; /* address of the allocated buffer */ - }; - -@@ -810,8 +814,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - uint32_t dst_rowsize, shift_width; - uint32_t bytes_per_sample, bytes_per_pixel; - uint32_t trailing_bits, prev_trailing_bits; -- uint32_t tile_rowsize = TIFFTileRowSize(in); -- uint32_t src_offset, dst_offset; -+ tmsize_t tile_rowsize = TIFFTileRowSize(in); -+ tmsize_t src_offset, dst_offset; - uint32_t row_offset, col_offset; - uint8_t *bufp = (uint8_t*) buf; - unsigned char *src = NULL; -@@ -861,7 +865,7 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8_t* buf, - TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size."); - exit(EXIT_FAILURE); - } -- tilebuf = limitMalloc(tile_buffsize + 3); -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 0; - tilebuf[tile_buffsize] = 0; -@@ -1024,7 +1028,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8_t *obuf, - for (sample = 0; (sample < spp) && (sample < MAX_SAMPLES); sample++) - { - srcbuffs[sample] = NULL; -- tbuff = (unsigned char *)limitMalloc(tilesize + 8); -+ tbuff = (unsigned char *)limitMalloc(tilesize + NUM_BUFF_OVERSIZE_BYTES); - if (!tbuff) - { - TIFFError ("readSeparateTilesIntoBuffer", -@@ -1217,7 +1221,8 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - rowstripsize = rowsperstrip * bytes_per_sample * (width + 1); - -- obuf = limitMalloc (rowstripsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ obuf = limitMalloc (rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (obuf == NULL) - return 1; - -@@ -1229,7 +1234,7 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - - stripsize = TIFFVStripSize(out, nrows); - src = buf + (row * rowsize); -- memset (obuf, '\0', rowstripsize); -+ memset (obuf, '\0',rowstripsize + NUM_BUFF_OVERSIZE_BYTES); - if (extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps, dump)) - { - _TIFFfree(obuf); -@@ -1237,10 +1242,15 @@ writeBufferToSeparateStrips (TIFF* out, uint8_t* buf, - } - if ((dump->outfile != NULL) && (dump->level == 1)) - { -- dump_info(dump->outfile, dump->format,"", -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } -+ dump_info(dump->outfile, dump->format,"", - "Sample %2d, Strip: %2d, bytes: %4d, Row %4d, bytes: %4d, Input offset: %6d", -- s + 1, strip + 1, stripsize, row + 1, scanlinesize, src - buf); -- dump_buffer(dump->outfile, dump->format, nrows, scanlinesize, row, obuf); -+ s + 1, strip + 1, stripsize, row + 1, (uint32_t)scanlinesize, src - buf); -+ dump_buffer(dump->outfile, dump->format, nrows, (uint32_t)scanlinesize, row, obuf); - } - - if (TIFFWriteEncodedStrip(out, strip++, obuf, stripsize) < 0) -@@ -1267,7 +1277,7 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -- uint32_t tile_rowsize = TIFFTileRowSize(out); -+ tmsize_t tile_rowsize = TIFFTileRowSize(out); - uint8_t* bufp = (uint8_t*) buf; - tsize_t tile_buffsize = 0; - tsize_t tilesize = TIFFTileSize(out); -@@ -1310,9 +1320,11 @@ static int writeBufferToContigTiles (TIFF* out, uint8_t* buf, uint32_t imageleng - } - src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; - -- tilebuf = limitMalloc(tile_buffsize); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tilebuf = limitMalloc(tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (tilebuf == 0) - return 1; -+ memset(tilebuf, 0, tile_buffsize + NUM_BUFF_OVERSIZE_BYTES); - for (row = 0; row < imagelength; row += tl) - { - nrow = (row + tl > imagelength) ? imagelength - row : tl; -@@ -1358,7 +1370,8 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - uint32_t imagewidth, tsample_t spp, - struct dump_opts * dump) - { -- tdata_t obuf = limitMalloc(TIFFTileSize(out)); -+ /* Add 3 padding bytes for extractContigSamples32bits */ -+ tdata_t obuf = limitMalloc(TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - uint32_t tl, tw; - uint32_t row, col, nrow, ncol; - uint32_t src_rowsize, col_offset; -@@ -1368,6 +1381,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8_t* buf, uint32_t imagele - - if (obuf == NULL) - return 1; -+ memset(obuf, 0, TIFFTileSize(out) + NUM_BUFF_OVERSIZE_BYTES); - - if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) || - !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) || -@@ -1793,14 +1807,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - - *opt_offset = '\0'; - /* convert option to lowercase */ -- end = strlen (opt_ptr); -+ end = (unsigned int)strlen (opt_ptr); - for (i = 0; i < end; i++) - *(opt_ptr + i) = tolower((int) *(opt_ptr + i)); - /* Look for dump format specification */ - if (strncmp(opt_ptr, "for", 3) == 0) - { - /* convert value to lowercase */ -- end = strlen (opt_offset + 1); -+ end = (unsigned int)strlen (opt_offset + 1); - for (i = 1; i <= end; i++) - *(opt_offset + i) = tolower((int) *(opt_offset + i)); - /* check dump format value */ -@@ -2273,6 +2287,8 @@ main(int argc, char* argv[]) - size_t length; - char temp_filename[PATH_MAX + 16]; /* Extra space keeps the compiler from complaining */ - -+ assert(NUM_BUFF_OVERSIZE_BYTES >= 3); -+ - little_endian = *((unsigned char *)&little_endian) & '1'; - - initImageData(&image); -@@ -3227,13 +3243,13 @@ extractContigSamples32bits (uint8_t *in, uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3642,13 +3658,13 @@ extractContigSamplesShifted32bits (uint8_t *in, uint8_t *out, uint32_t cols, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -3825,10 +3841,10 @@ extractContigSamplesToTileBuffer(uint8_t *out, uint8_t *in, uint32_t rows, uint3 - static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - { - uint8_t* bufp = buf; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint32_t strip, nstrips = TIFFNumberOfStrips(in); -- uint32_t stripsize = TIFFStripSize(in); -- uint32_t rows = 0; -+ tmsize_t stripsize = TIFFStripSize(in); -+ tmsize_t rows = 0; - uint32_t rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps); - tsize_t scanline_size = TIFFScanlineSize(in); - -@@ -3841,11 +3857,11 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8_t* buf) - bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1); - rows = bytes_read / scanline_size; - if ((strip < (nstrips - 1)) && (bytes_read != (int32_t)stripsize)) -- TIFFError("", "Strip %"PRIu32": read %"PRId32" bytes, strip size %"PRIu32, -+ TIFFError("", "Strip %"PRIu32": read %"PRId64" bytes, strip size %"PRIu64, - strip + 1, bytes_read, stripsize); - - if (bytes_read < 0 && !ignore) { -- TIFFError("", "Error reading strip %"PRIu32" after %"PRIu32" rows", -+ TIFFError("", "Error reading strip %"PRIu32" after %"PRIu64" rows", - strip, rows); - return 0; - } -@@ -4310,13 +4326,13 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4359,10 +4375,10 @@ combineSeparateSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4835,13 +4851,13 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - /* If we have a full buffer's worth, write it out */ - if (ready_bits >= 32) - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -4884,10 +4900,10 @@ combineSeparateTileSamples32bits (uint8_t *in[], uint8_t *out, uint32_t cols, - "Row %3d, Col %3d, Src byte offset %3d bit offset %2d Dst offset %3d", - row + 1, col + 1, src_byte, src_bit, dst - out); - -- dump_long (dumpfile, format, "Match bits ", matchbits); -+ dump_wide (dumpfile, format, "Match bits ", matchbits); - dump_data (dumpfile, format, "Src bits ", src, 4); -- dump_long (dumpfile, format, "Buff1 bits ", buff1); -- dump_long (dumpfile, format, "Buff2 bits ", buff2); -+ dump_wide (dumpfile, format, "Buff1 bits ", buff1); -+ dump_wide (dumpfile, format, "Buff2 bits ", buff2); - dump_byte (dumpfile, format, "Write bits1", bytebuff1); - dump_byte (dumpfile, format, "Write bits2", bytebuff2); - dump_info (dumpfile, format, "", "Ready bits: %2d", ready_bits); -@@ -4910,7 +4926,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - { - int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1; - uint32_t j; -- int32_t bytes_read = 0; -+ tmsize_t bytes_read = 0; - uint16_t bps = 0, planar; - uint32_t nstrips; - uint32_t strips_per_sample; -@@ -4976,7 +4992,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++) - { - srcbuffs[s] = NULL; -- buff = limitMalloc(stripsize + 3); -+ buff = limitMalloc(stripsize + NUM_BUFF_OVERSIZE_BYTES); - if (!buff) - { - TIFFError ("readSeparateStripsIntoBuffer", -@@ -4999,7 +5015,7 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8_t *obuf, uint32_t lengt - buff = srcbuffs[s]; - strip = (s * strips_per_sample) + j; - bytes_read = TIFFReadEncodedStrip (in, strip, buff, stripsize); -- rows_this_strip = bytes_read / src_rowsize; -+ rows_this_strip = (uint32_t)(bytes_read / src_rowsize); - if (bytes_read < 0 && !ignore) - { - TIFFError(TIFFFileName(in), -@@ -6062,13 +6078,14 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - uint16_t input_compression = 0, input_photometric = 0; - uint16_t subsampling_horiz, subsampling_vert; - uint32_t width = 0, length = 0; -- uint32_t stsize = 0, tlsize = 0, buffsize = 0, scanlinesize = 0; -+ tmsize_t stsize = 0, tlsize = 0, buffsize = 0; -+ tmsize_t scanlinesize = 0; - uint32_t tw = 0, tl = 0; /* Tile width and length */ -- uint32_t tile_rowsize = 0; -+ tmsize_t tile_rowsize = 0; - unsigned char *read_buff = NULL; - unsigned char *new_buff = NULL; - int readunit = 0; -- static uint32_t prev_readsize = 0; -+ static tmsize_t prev_readsize = 0; - - TIFFGetFieldDefaulted(in, TIFFTAG_BITSPERSAMPLE, &bps); - TIFFGetFieldDefaulted(in, TIFFTAG_SAMPLESPERPIXEL, &spp); -@@ -6325,6 +6342,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - /* The buffsize_check and the possible adaptation of buffsize - * has to account also for padding of each line to a byte boundary. - * This is assumed by mirrorImage() and rotateImage(). -+ * Furthermore, functions like extractContigSamplesShifted32bits() -+ * need a buffer, which is at least 3 bytes larger than the actual image. - * Otherwise buffer-overflow might occur there. - */ - buffsize_check = length * (uint32_t)(((width * spp * bps) + 7) / 8); -@@ -6376,7 +6395,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { -@@ -6387,11 +6406,11 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - TIFFError("loadImage", "Unable to allocate/reallocate read buffer"); - return (-1); - } -- new_buff = _TIFFrealloc(read_buff, buffsize+3); -+ new_buff = _TIFFrealloc(read_buff, buffsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (read_buff); -- read_buff = (unsigned char *)limitMalloc(buffsize+3); -+ read_buff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - read_buff = new_buff; -@@ -6464,8 +6483,13 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c - dump_info (dump->infile, dump->format, "", - "Bits per sample %"PRIu16", Samples per pixel %"PRIu16, bps, spp); - -+ if (scanlinesize > 0x0ffffffffULL) { -+ dump_info(dump->infile, dump->format, "loadImage", -+ "Attention: scanlinesize %"PRIu64" is larger than UINT32_MAX.\nFollowing dump might be wrong.", -+ scanlinesize); -+ } - for (i = 0; i < length; i++) -- dump_buffer(dump->infile, dump->format, 1, scanlinesize, -+ dump_buffer(dump->infile, dump->format, 1, (uint32_t)scanlinesize, - i, read_buff + (i * scanlinesize)); - } - return (0); -@@ -7485,13 +7509,13 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -7554,23 +7578,23 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - - if (!sect_buff) - { -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!sect_buff) - { - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - { - if (prev_sectsize < sectsize) - { -- new_buff = _TIFFrealloc(sect_buff, sectsize); -+ new_buff = _TIFFrealloc(sect_buff, sectsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - _TIFFfree (sect_buff); -- sect_buff = (unsigned char *)limitMalloc(sectsize); -+ sect_buff = (unsigned char *)limitMalloc(sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - sect_buff = new_buff; -@@ -7580,7 +7604,7 @@ createImageSection(uint32_t sectsize, unsigned char **sect_buff_ptr) - TIFFError("createImageSection", "Unable to allocate/reallocate section buffer"); - return (-1); - } -- _TIFFmemset(sect_buff, 0, sectsize); -+ _TIFFmemset(sect_buff, 0, sectsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -7611,17 +7635,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[0].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7634,7 +7658,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[0].buffer = crop_buff; - seg_buffs[0].size = cropsize; - -@@ -7714,17 +7738,17 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - cropsize = crop->bufftotal; - crop_buff = seg_buffs[i].buffer; - if (!crop_buff) -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - else - { - prev_cropsize = seg_buffs[0].size; - if (prev_cropsize < cropsize) - { -- next_buff = _TIFFrealloc(crop_buff, cropsize); -+ next_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (! next_buff) - { - _TIFFfree (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = next_buff; -@@ -7737,7 +7761,7 @@ processCropSelections(struct image_data *image, struct crop_mask *crop, - return (-1); - } - -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - seg_buffs[i].buffer = crop_buff; - seg_buffs[i].size = cropsize; - -@@ -7853,24 +7877,24 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - crop_buff = *crop_buff_ptr; - if (!crop_buff) - { -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!crop_buff) - { - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - prev_cropsize = cropsize; - } - else - { - if (prev_cropsize < cropsize) - { -- new_buff = _TIFFrealloc(crop_buff, cropsize); -+ new_buff = _TIFFrealloc(crop_buff, cropsize + NUM_BUFF_OVERSIZE_BYTES); - if (!new_buff) - { - free (crop_buff); -- crop_buff = (unsigned char *)limitMalloc(cropsize); -+ crop_buff = (unsigned char *)limitMalloc(cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - else - crop_buff = new_buff; -@@ -7879,7 +7903,7 @@ createCroppedImage(struct image_data *image, struct crop_mask *crop, - TIFFError("createCroppedImage", "Unable to allocate/reallocate crop buffer"); - return (-1); - } -- _TIFFmemset(crop_buff, 0, cropsize); -+ _TIFFmemset(crop_buff, 0, cropsize + NUM_BUFF_OVERSIZE_BYTES); - } - } - -@@ -8177,13 +8201,13 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image, - if (TIFFGetField(in, TIFFTAG_NUMBEROFINKS, &ninks)) { - TIFFSetField(out, TIFFTAG_NUMBEROFINKS, ninks); - if (TIFFGetField(in, TIFFTAG_INKNAMES, &inknames)) { -- int inknameslen = strlen(inknames) + 1; -+ int inknameslen = (int)strlen(inknames) + 1; - const char* cp = inknames; - while (ninks > 1) { - cp = strchr(cp, '\0'); - if (cp) { - cp++; -- inknameslen += (strlen(cp) + 1); -+ inknameslen += ((int)strlen(cp) + 1); - } - ninks--; - } -@@ -8568,13 +8592,13 @@ rotateContigSamples32bits(uint16_t rotation, uint16_t spp, uint16_t bps, uint32_ - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -8643,12 +8667,13 @@ rotateImage(uint16_t rotation, struct image_data *image, uint32_t *img_width, - return (-1); - } - -- if (!(rbuff = (unsigned char *)limitMalloc(buffsize))) -+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */ -+ if (!(rbuff = (unsigned char *)limitMalloc(buffsize + NUM_BUFF_OVERSIZE_BYTES))) - { -- TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize); -+ TIFFError("rotateImage", "Unable to allocate rotation buffer of %1u bytes", buffsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -- _TIFFmemset(rbuff, '\0', buffsize); -+ _TIFFmemset(rbuff, '\0', buffsize + NUM_BUFF_OVERSIZE_BYTES); - - ibuff = *ibuff_ptr; - switch (rotation) -@@ -9176,13 +9201,13 @@ reverseSamples32bits (uint16_t spp, uint16_t bps, uint32_t width, - } - else /* If we have a full buffer's worth, write it out */ - { -- bytebuff1 = (buff2 >> 56); -+ bytebuff1 = (uint8_t)(buff2 >> 56); - *dst++ = bytebuff1; -- bytebuff2 = (buff2 >> 48); -+ bytebuff2 = (uint8_t)(buff2 >> 48); - *dst++ = bytebuff2; -- bytebuff3 = (buff2 >> 40); -+ bytebuff3 = (uint8_t)(buff2 >> 40); - *dst++ = bytebuff3; -- bytebuff4 = (buff2 >> 32); -+ bytebuff4 = (uint8_t)(buff2 >> 32); - *dst++ = bytebuff4; - ready_bits -= 32; - -@@ -9273,12 +9298,13 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - case MIRROR_BOTH: - case MIRROR_VERT: -- line_buff = (unsigned char *)limitMalloc(rowsize); -+ line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES); - if (line_buff == NULL) - { -- TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize); -+ TIFFError ("mirrorImage", "Unable to allocate mirror line buffer of %1u bytes", rowsize + NUM_BUFF_OVERSIZE_BYTES); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - - dst = ibuff + (rowsize * (length - 1)); - for (row = 0; row < length / 2; row++) -@@ -9310,11 +9336,12 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - } - else - { /* non 8 bit per sample data */ -- if (!(line_buff = (unsigned char *)limitMalloc(rowsize + 1))) -+ if (!(line_buff = (unsigned char *)limitMalloc(rowsize + NUM_BUFF_OVERSIZE_BYTES))) - { - TIFFError("mirrorImage", "Unable to allocate mirror line buffer"); - return (-1); - } -+ _TIFFmemset(line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - bytes_per_sample = (bps + 7) / 8; - bytes_per_pixel = ((bps * spp) + 7) / 8; - if (bytes_per_pixel < (bytes_per_sample + 1)) -@@ -9326,7 +9353,7 @@ mirrorImage(uint16_t spp, uint16_t bps, uint16_t mirror, uint32_t width, uint32_ - { - row_offset = row * rowsize; - src = ibuff + row_offset; -- _TIFFmemset (line_buff, '\0', rowsize); -+ _TIFFmemset (line_buff, '\0', rowsize + NUM_BUFF_OVERSIZE_BYTES); - switch (shift_width) - { - case 1: if (reverseSamples16bits(spp, bps, width, src, line_buff)) --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-2953.patch deleted +0
-86@@ -1,86 +0,0 @@ -CVE: CVE-2022-2953 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 8fe3735942ea1d90d8cef843b55b3efe8ab6feaf Mon Sep 17 00:00:00 2001 -From: Su_Laus <[email protected]> -Date: Mon, 15 Aug 2022 22:11:03 +0200 -Subject: [PATCH] =?UTF-8?q?According=20to=20Richard=20Nolde=20https://gitl?= - =?UTF-8?q?ab.com/libtiff/libtiff/-/issues/401#note=5F877637400=20the=20ti?= - =?UTF-8?q?ffcrop=20option=20=E2=80=9E-S=E2=80=9C=20is=20also=20mutually?= - =?UTF-8?q?=20exclusive=20to=20the=20other=20crop=20options=20(-X|-Y),=20-?= - =?UTF-8?q?Z=20and=20-z.?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is now checked and ends tiffcrop if those arguments are not mutually exclusive. - -This MR will fix the following tiffcrop issues: #349, #414, #422, #423, #424 ---- - tools/tiffcrop.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index 90286a5e..c3b758ec 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -173,12 +173,12 @@ static char tiffcrop_rev_date[] = "02-09-2022"; - #define ROTATECW_270 32 - #define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270) - --#define CROP_NONE 0 --#define CROP_MARGINS 1 --#define CROP_WIDTH 2 --#define CROP_LENGTH 4 --#define CROP_ZONES 8 --#define CROP_REGIONS 16 -+#define CROP_NONE 0 /* "-S" -> Page_MODE_ROWSCOLS and page->rows/->cols != 0 */ -+#define CROP_MARGINS 1 /* "-m" */ -+#define CROP_WIDTH 2 /* "-X" */ -+#define CROP_LENGTH 4 /* "-Y" */ -+#define CROP_ZONES 8 /* "-Z" */ -+#define CROP_REGIONS 16 /* "-z" */ - #define CROP_ROTATE 32 - #define CROP_MIRROR 64 - #define CROP_INVERT 128 -@@ -316,7 +316,7 @@ struct crop_mask { - #define PAGE_MODE_RESOLUTION 1 - #define PAGE_MODE_PAPERSIZE 2 - #define PAGE_MODE_MARGINS 4 --#define PAGE_MODE_ROWSCOLS 8 -+#define PAGE_MODE_ROWSCOLS 8 /* for -S option */ - - #define INVERT_DATA_ONLY 10 - #define INVERT_DATA_AND_TAG 11 -@@ -781,7 +781,7 @@ static const char usage_info[] = - " The four debug/dump options are independent, though it makes little sense to\n" - " specify a dump file without specifying a detail level.\n" - "\n" --"Note: The (-X|-Y), -Z and -z options are mutually exclusive.\n" -+"Note: The (-X|-Y), -Z, -z and -S options are mutually exclusive.\n" - " In no case should the options be applied to a given selection successively.\n" - "\n" - ; -@@ -2131,13 +2131,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 - /*NOTREACHED*/ - } - } -- /*-- Check for not allowed combinations (e.g. -X, -Y and -Z and -z are mutually exclusive) --*/ -- char XY, Z, R; -+ /*-- Check for not allowed combinations (e.g. -X, -Y and -Z, -z and -S are mutually exclusive) --*/ -+ char XY, Z, R, S; - XY = ((crop_data->crop_mode & CROP_WIDTH) || (crop_data->crop_mode & CROP_LENGTH)); - Z = (crop_data->crop_mode & CROP_ZONES); - R = (crop_data->crop_mode & CROP_REGIONS); -- if ((XY && Z) || (XY && R) || (Z && R)) { -- TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z and -z are mutually exclusive.->Exit"); -+ S = (page->mode & PAGE_MODE_ROWSCOLS); -+ if ((XY && Z) || (XY && R) || (XY && S) || (Z && R) || (Z && S) || (R && S)) { -+ TIFFError("tiffcrop input error", "The crop options(-X|-Y), -Z, -z and -S are mutually exclusive.->Exit"); - exit(EXIT_FAILURE); - } - } /* end process_command_opts */ --- -2.34.1 -meta/recipes-multimedia/libtiff/files/CVE-2022-34526.patch deleted +0
-32@@ -1,32 +0,0 @@ -From 275735d0354e39c0ac1dc3c0db2120d6f31d1990 Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Mon, 27 Jun 2022 16:09:43 +0200 -Subject: [PATCH] _TIFFCheckFieldIsValidForCodec(): return FALSE when passed a - codec-specific tag and the codec is not configured (fixes #433) - -This avoids crashes when querying such tags - -CVE: CVE-2022-34526 -Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990] -Signed-off-by: Khem Raj <[email protected]> ---- - libtiff/tif_dirinfo.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c -index c30f569b..3371cb5c 100644 ---- a/libtiff/tif_dirinfo.c -+++ b/libtiff/tif_dirinfo.c -@@ -1191,6 +1191,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag) - default: - return 1; - } -+ if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) { -+ return 0; -+ } - /* Check if codec specific tags are allowed for the current - * compression scheme (codec) */ - switch (tif->tif_dir.td_compression) { --- -GitLab -meta/recipes-multimedia/libtiff/files/CVE-2022-3970.patch deleted +0
-39@@ -1,39 +0,0 @@ -From 227500897dfb07fb7d27f7aa570050e62617e3be Mon Sep 17 00:00:00 2001 -From: Even Rouault <[email protected]> -Date: Tue, 8 Nov 2022 15:16:58 +0100 -Subject: [PATCH] TIFFReadRGBATileExt(): fix (unsigned) integer overflow on - strips/tiles > 2 GB - -Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53137 -Upstream-Status: Accepted ---- - libtiff/tif_getimage.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c -index a4d0c1d6..60b94d8e 100644 ---- a/libtiff/tif_getimage.c -+++ b/libtiff/tif_getimage.c -@@ -3016,15 +3016,15 @@ TIFFReadRGBATileExt(TIFF* tif, uint32_t col, uint32_t row, uint32_t * raster, in - return( ok ); - - for( i_row = 0; i_row < read_ysize; i_row++ ) { -- memmove( raster + (tile_ysize - i_row - 1) * tile_xsize, -- raster + (read_ysize - i_row - 1) * read_xsize, -+ memmove( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, -+ raster + (size_t)(read_ysize - i_row - 1) * read_xsize, - read_xsize * sizeof(uint32_t) ); -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize+read_xsize, - 0, sizeof(uint32_t) * (tile_xsize - read_xsize) ); - } - - for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) { -- _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize, -+ _TIFFmemset( raster + (size_t)(tile_ysize - i_row - 1) * tile_xsize, - 0, sizeof(uint32_t) * tile_xsize ); - } - --- -2.33.0 -meta/recipes-multimedia/libtiff/tiff_4.5.0.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.4.0.bb +4
-14@@ -4,22 +4,13 @@ DESCRIPTION = "Library provides support for the Tag Image File Format \ provide means to easily access and create TIFF image files." HOMEPAGE = "http://www.libtiff.org/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3" CVE_PRODUCT = "libtiff" -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://0001-fix-the-FPE-in-tiffcrop-415-427-and-428.patch \ - file://CVE-2022-34526.patch \ - file://CVE-2022-2953.patch \ - file://CVE-2022-3970.patch \ - file://0001-Revised-handling-of-TIFFTAG_INKNAMES-and-related-TIF.patch \ - file://0001-tiffcrop-S-option-Make-decision-simpler.patch \ - file://0001-tiffcrop-disable-incompatibility-of-Z-X-Y-z-options-.patch \ - file://0001-tiffcrop-subroutines-require-a-larger-buffer-fixes-2.patch \ - " - -SRC_URI[sha256sum] = "917223b37538959aca3b790d2d73aa6e626b688e02dcda272aec24c2f498abed" +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz" + +SRC_URI[sha256sum] = "c7a1d9296649233979fa3eacffef3fa024d73d05d589cb622727b5b08c423464" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175395): https://lists.openembedded.org/g/openembedded-core/message/175395
Mute This Topic: https://lists.openembedded.org/mt/96047877/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 10/77 gnupg: update 2.3.8 -> 2.4.0
In reply to Alexander Kanavin---
...-a-custom-value-for-the-location-of-.patch | 6 ++--
...use-pkgconfig-instead-of-npth-config.patch | 6 ++--
.../gnupg/gnupg/fix-ldap.patch | 35 -------------------
.../gnupg/gnupg/relocate.patch | 2 +-
.../gnupg/{gnupg_2.3.8.bb => gnupg_2.4.0.bb} | 3 +-
5 files changed, 8 insertions(+), 44 deletions(-)
delete mode 100644 meta/recipes-support/gnupg/gnupg/fix-ldap.patch
rename meta/recipes-support/gnupg/{gnupg_2.3.8.bb => gnupg_2.4.0.bb} (95%)meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch +3 -3
@@ -1,4 +1,4 @@ -From b0c42c8273c5fa1e31094567122be24ba28a965d Mon Sep 17 00:00:00 2001 +From 346a6b17a07b658954db65f814461b59824d9fcd Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Mon, 22 Jan 2018 18:00:21 +0200 Subject: [PATCH] configure.ac: use a custom value for the location of
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index b043386..dd839d0 100644 +index 099c6a8..e8cf408 100644 --- a/configure.ac +++ b/configure.ac -@@ -1955,7 +1955,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf", +@@ -1935,7 +1935,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf", AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch +3 -3
@@ -1,4 +1,4 @@ -From 15668161c351aee5f29152db2972b1648da11210 Mon Sep 17 00:00:00 2001 +From d9048788d906774b1475c3bb1b17e22455c2add4 Mon Sep 17 00:00:00 2001 From: Saul Wold <[email protected]> Date: Wed, 16 Aug 2017 11:16:30 +0800 Subject: [PATCH] use pkgconfig instead of npth config
@@ -15,7 +15,7 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/m4/npth.m4 b/m4/npth.m4 -index 06cdaee..4adda01 100644 +index 619ed89..0cb354d 100644 --- a/m4/npth.m4 +++ b/m4/npth.m4 @@ -19,25 +19,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
@@ -25,7 +25,7 @@ index 06cdaee..4adda01 100644 + AC_PATH_PROG(PKGCONFIG, pkg-config, no) - use_gpgrt_config="" -- if test x"$NPTH_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then +- if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if $GPGRT_CONFIG npth --exists; then - NPTH_CONFIG="$GPGRT_CONFIG npth" - AC_MSG_NOTICE([Use gpgrt-config as npth-config])
meta/recipes-support/gnupg/gnupg/fix-ldap.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From 7011286ce6e1fb56c2989fdafbd11b931c489faa Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka <[email protected]> -Date: Fri, 14 Oct 2022 09:58:41 +0900 -Subject: [PATCH] dirmngr: Fix build with no LDAP support. - -* dirmngr/server.c [USE_LDAP] (start_command_handler): Conditionalize. - --- - -GnuPG-bug-id: 6239 -Signed-off-by: NIIBE Yutaka <[email protected]> -Upstream-Status: Backport [https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=patch;h=7011286ce6e1fb56c2989fdafbd11b931c489faa] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - dirmngr/server.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/dirmngr/server.c b/dirmngr/server.c -index 04ebfd317..98f354300 100644 ---- a/dirmngr/server.c -+++ b/dirmngr/server.c -@@ -3137,8 +3137,10 @@ start_command_handler (assuan_fd_t fd, unsigned int session_id) - ctrl->refcount); - else - { -+#if USE_LDAP - ks_ldap_free_state (ctrl->ks_get_state); - ctrl->ks_get_state = NULL; -+#endif - release_ctrl_ocsp_certs (ctrl); - xfree (ctrl->server_local); - dirmngr_deinit_default_ctrl (ctrl); --- -2.11.0 -
meta/recipes-support/gnupg/gnupg/relocate.patch +1 -1
@@ -1,4 +1,4 @@ -From 7c6f9724f53ed2c5237dad4e3f4ec44091ac683d Mon Sep 17 00:00:00 2001 +From b1117adeb476304ce2792814516a5b7cd44d0d38 Mon Sep 17 00:00:00 2001 From: Ross Burton <[email protected]> Date: Wed, 19 Sep 2018 14:44:40 +0100 Subject: [PATCH] Allow the environment to override where gnupg looks for its
meta/recipes-support/gnupg/gnupg_2.4.0.bb renamed from meta/recipes-support/gnupg/gnupg_2.3.8.bb +1 -2
@@ -18,13 +18,12 @@ SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://0002-use-pkgconfig-instead-of-npth-config.patch \ file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \ file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \ - file://fix-ldap.patch \ " SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \ file://relocate.patch" SRC_URI:append:class-nativesdk = " file://relocate.patch" -SRC_URI[sha256sum] = "540b7a40e57da261fb10ef521a282e0021532a80fd023e75fb71757e8a4969ed" +SRC_URI[sha256sum] = "1d79158dd01d992431dd2e3facb89fdac97127f89784ea2cb610c600fb0c1483" EXTRA_OECONF = "--disable-ldap \ --disable-ccid-driver \
Signature · 1 line
2.30.2
PATCH 11/77 libksba: update 1.6.2 -> 1.6.3
In reply to Alexander Kanavin---
.../libksba/libksba/ksba-add-pkgconfig-support.patch | 6 +++---
.../libksba/{libksba_1.6.2.bb => libksba_1.6.3.bb} | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
rename meta/recipes-support/libksba/{libksba_1.6.2.bb => libksba_1.6.3.bb} (94%)meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch +3 -3
@@ -1,4 +1,4 @@ -From 6081640895b6d566fa21123e2de7d111eeab5c4c Mon Sep 17 00:00:00 2001 +From ca8174aa81d7bf364b33f7254a9e887735c4996d Mon Sep 17 00:00:00 2001 From: Chen Qi <[email protected]> Date: Mon, 3 Dec 2012 18:17:31 +0800 Subject: [PATCH] libksba: add pkgconfig support
@@ -16,7 +16,7 @@ Signed-off-by: Chen Qi <[email protected]> 1 file changed, 4 insertions(+), 86 deletions(-) diff --git a/src/ksba.m4 b/src/ksba.m4 -index 6b55bb8..6e7336f 100644 +index 452c245..aa96255 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -23,37 +23,6 @@ dnl with a changed API.
@@ -44,7 +44,7 @@ index 6b55bb8..6e7336f 100644 - fi - - use_gpgrt_config="" -- if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then +- if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if $GPGRT_CONFIG ksba --exists; then - KSBA_CONFIG="$GPGRT_CONFIG ksba" - AC_MSG_NOTICE([Use gpgrt-config as ksba-config])
meta/recipes-support/libksba/libksba_1.6.3.bb renamed from meta/recipes-support/libksba/libksba_1.6.2.bb +1 -1
@@ -24,7 +24,7 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://ksba-add-pkgconfig-support.patch" -SRC_URI[sha256sum] = "fce01ccac59812bddadffacff017dac2e4762bdb6ebc6ffe06f6ed4f6192c971" +SRC_URI[sha256sum] = "3f72c68db30971ebbf14367527719423f0a4d5f8103fc9f4a1c01a9fa440de5c" do_configure:prepend () { # Else these could be used in preference to those in aclocal-copy
Signature · 1 line
2.30.2
PATCH 12/77 man-pages: upgrade 6.01 -> 6.02
In reply to Alexander KanavinLicense-Update: readme rewritten, set of licenses provided explicitly.
Of those, there's various bsd flavours, gpl2-and-later and gpl-2-only, so add the latter.
---
.../man-pages/{man-pages_6.01.bb => man-pages_6.02.bb} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-extended/man-pages/{man-pages_6.01.bb => man-pages_6.02.bb} (83%)meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +3 -3
@@ -2,12 +2,12 @@ SUMMARY = "Linux man-pages" DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs" SECTION = "console/utils" HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" -LICENSE = "GPL-2.0-or-later" +LICENSE = "GPL-2.0-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://README;md5=bf1faa9b0245e39a7c0c9690ffdf6e54" +LIC_FILES_CHKSUM = "file://README;md5=26901408d8cfd6f6675f8b49daf9cc74" SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz" -SRC_URI[sha256sum] = "c1e8bea88589f1a80b67dafd82fb98b018ddd7f7bfa594f8f79686258d26e784" +SRC_URI[sha256sum] = "968def9e7055c9cbca9a4f21f79677b02ac8b0d2fa62ceea7bd8ef4dcc6cac41" inherit manpages
Signature · 1 line
2.30.2
Re: [OE-core] [PATCH 12/77] man-pages: upgrade 6.01 -> 6.02
Quoted 4 lines · Alexander Kanavin
License-Update: readme rewritten, set of licenses provided explicitly.
Of those, there's various bsd flavours, gpl2-and-later and gpl-2-only, so add the latter.
That does mean I have to ask whether the BSD licenses are missing from LICENSE and should be added too?
Cheers,
Richard
Quoted 38 lines
Signed-off-by Alexander Kanavin <[email protected]>--- .../man-pages/{man-pages_6.01.bb => man-pages_6.02.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meta/recipes-extended/man-pages/{man-pages_6.01.bb => man-pages_6.02.bb} (83%)meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +3
-4@@ -2,12 +2,12 @@ SUMMARY = "Linux man-pages" DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs" SECTION = "console/utils" HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" -LICENSE = "GPL-2.0-or-later" +LICENSE = "GPL-2.0-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://README;md5=bf1faa9b0245e39a7c0c9690ffdf6e54" +LIC_FILES_CHKSUM = "file://README;md5=26901408d8cfd6f6675f8b49daf9cc74" SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz" -SRC_URI[sha256sum] = "c1e8bea88589f1a80b67dafd82fb98b018ddd7f7bfa594f8f79686258d26e784" +SRC_URI[sha256sum] = "968def9e7055c9cbca9a4f21f79677b02ac8b0d2fa62ceea7bd8ef4dcc6cac41" inherit manpages -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#175398): https://lists.openembedded.org/g/openembedded-core/message/175398
Mute This Topic: https://lists.openembedded.org/mt/96047880/1686473
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 12/77] man-pages: upgrade 6.01 -> 6.02
Quoted 9 lines · Richard Purdie
Quoted 3 lines · Alexander Kanavin
License-Update: readme rewritten, set of licenses provided explicitly.
Of those, there's various bsd flavours, gpl2-and-later and gpl-2-only,
so add the
Quoted 1 line
latter.
That does mean I have to ask whether the BSD licenses are missing from LICENSE and should be added too?
They should, yes. I’ll resend. The idea was that gpl + bsd = gpl, but not when pieces are individually installed.
Alex
Quoted 52 lines
Cheers,
Richard
Quoted 6 lines
Signed-off-by Alexander Kanavin <[email protected]>--- .../man-pages/{man-pages_6.01.bb => man-pages_6.02.bb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename meta/recipes-extended/man-pages/{man-pages_6.01.bb =>man-pages_6.02.bb} (83%)
Review
Quoted 2 lines
(quoted diff) +0
-0b/meta/recipes-extended/man-pages/man-pages_6.02.bb
meta/recipes-extended/man-pages/man-pages_6.02.bb SUMMARY = "Linux man-pages" · line 2
Quoted 8 lines
similarity index 83%
rename from meta/recipes-extended/man-pages/man-pages_6.01.bb rename to meta/recipes-extended/man-pages/man-pages_6.02.bb index1ad4ed1317..2e574e1de4100644meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +0
-0@@ -2,12 +2,12 @@ SUMMARY = "Linux man-pages" DESCRIPTION = "The Linux man-pages project documents the Linux kerneland C library interfaces that are employed by user programs"
meta/recipes-extended/man-pages/man-pages_6.02.bb SUMMARY = "Linux man-pages"
Quoted 10 lines
meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +2
-3SECTION = "console/utils" HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages" -LICENSE = "GPL-2.0-or-later" +LICENSE = "GPL-2.0-or-later & GPL-2.0-only" -LIC_FILES_CHKSUM = "file://README;md5=bf1faa9b0245e39a7c0c9690ffdf6e54" +LIC_FILES_CHKSUM = "file://README;md5=26901408d8cfd6f6675f8b49daf9cc74" SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz" -SRC_URI[sha256sum] ="
c1e8bea88589f1a80b67dafd82fb98b018ddd7f7bfa594f8f79686258d26e784"meta/recipes-extended/man-pages/man-pages_6.02.bb SUMMARY = "Linux man-pages" · line 10
Quoted 1 line
meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +1
-0+SRC_URI[sha256sum] ="
968def9e7055c9cbca9a4f21f79677b02ac8b0d2fa62ceea7bd8ef4dcc6cac41"Quoted 6 lines
meta/recipes-extended/man-pages/man-pages_6.02.bb renamed from meta/recipes-extended/man-pages/man-pages_6.01.bb +0
-1inherit manpages -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group. View/Reply Online (#175398):
https://lists.openembedded.org/g/openembedded-core/message/175398
Quoted 3 lines
Mute This Topic: https://lists.openembedded.org/mt/96047880/1686473
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 13/77 pango: upgrade 1.50.11 -> 1.50.12
In reply to Alexander Kanavin---
...d-install-nofonts-fonts.conf-as-it-i.patch | 35 -------------------
.../{pango_1.50.11.bb => pango_1.50.12.bb} | 3 +-
2 files changed, 1 insertion(+), 37 deletions(-)
delete mode 100644 meta/recipes-graphics/pango/pango/0001-tests-meson.build-install-nofonts-fonts.conf-as-it-i.patch
rename meta/recipes-graphics/pango/{pango_1.50.11.bb => pango_1.50.12.bb} (90%)meta/recipes-graphics/pango/pango/0001-tests-meson.build-install-nofonts-fonts.conf-as-it-i.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From 13f8ba5d5b699df1f88eeea859406daba6d6941f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Tue, 8 Nov 2022 18:08:51 +0100 -Subject: [PATCH] tests/meson.build: install nofonts/fonts.conf as it is - required by tests - -Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/pango/-/merge_requests/654] -Signed-off-by: Alexander Kanavin <[email protected]> ---- - tests/meson.build | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/tests/meson.build b/tests/meson.build -index 8b4bfa38..6c1c461b 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -250,6 +250,10 @@ foreach d: test_items_data - installed_test_items_data += d + '.expected' - endforeach - -+installed_test_nofonts_data = [ -+ 'nofonts/fonts.conf', -+] -+ - installed_test_datadir = join_paths(pango_datadir, 'installed-tests', 'pango') - installed_test_bindir = join_paths(pango_libexecdir, 'installed-tests', 'pango') - -@@ -261,6 +265,7 @@ if get_option('install-tests') - install_data(installed_test_breaks_data, install_dir: join_paths(installed_test_bindir, 'breaks')) - install_data(installed_test_items_data, install_dir: join_paths(installed_test_bindir, 'itemize')) - install_data(installed_test_fontsets_data, install_dir: join_paths(installed_test_bindir, 'fontsets')) -+ install_data(installed_test_nofonts_data, install_dir: join_paths(installed_test_bindir, 'nofonts')) - endif - - gen_installed_test = files([ 'gen-installed-test.py' ])
meta/recipes-graphics/pango/pango_1.50.12.bb renamed from meta/recipes-graphics/pango/pango_1.50.11.bb +1 -2
@@ -22,10 +22,9 @@ GIR_MESON_DISABLE_FLAG = "disabled" SRC_URI += "file://run-ptest \ file://0001-Skip-running-test-layout-test.patch \ - file://0001-tests-meson.build-install-nofonts-fonts.conf-as-it-i.patch \ " -SRC_URI[archive.sha256sum] = "8800f812d89ee61388188703203f3a7878963c22f8695aaf1fa0a1a1428d17ae" +SRC_URI[archive.sha256sum] = "caef96d27bbe792a6be92727c73468d832b13da57c8071ef79b9df69ee058fe3" DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz fribidi"
Signature · 1 line
2.30.2
PATCH 14/77 python3-pycryptodomex: upgrade 3.15.0 -> 3.16.0
In reply to Alexander Kanavin---
...-pycryptodomex_3.15.0.bb => python3-pycryptodomex_3.16.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-pycryptodomex_3.15.0.bb => python3-pycryptodomex_3.16.0.bb} (69%)meta/recipes-devtools/python/python3-pycryptodomex_3.16.0.bb renamed from meta/recipes-devtools/python/python3-pycryptodomex_3.15.0.bb +1 -1
@@ -1,7 +1,7 @@ require python-pycryptodome.inc inherit setuptools3 -SRC_URI[sha256sum] = "7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed" +SRC_URI[sha256sum] = "e9ba9d8ed638733c9e95664470b71d624a6def149e2db6cc52c1aca5a6a2df1d" FILES:${PN}-tests = " \ ${PYTHON_SITEPACKAGES_DIR}/Cryptodome/SelfTest/ \
Signature · 1 line
2.30.2
PATCH 15/77 piglit: upgrade to latest revision
In reply to Alexander Kanavin--- ...n-t-enable-GLX-if-tests-are-disabled.patch | 32 ------------------- meta/recipes-graphics/piglit/piglit_git.bb | 3 +- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch
meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From 13ff43fe760ac343b33d8e8c84b89886aac07116 Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <[email protected]> -Date: Fri, 3 Jun 2022 10:44:29 -0500 -Subject: [PATCH] cmake: Don't enable GLX if tests are disabled - -Allow building for systems that don't support GLX. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/720] -Signed-off-by: Tom Hochstein <[email protected]> ---- - CMakeLists.txt | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e1aeb5ddf..85e171aba 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -134,10 +134,7 @@ if(PIGLIT_BUILD_CL_TESTS) - endif(PIGLIT_BUILD_CL_TESTS) - - IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -- if(X11_FOUND AND OPENGL_gl_LIBRARY) -- # Assume the system has GLX. In the future, systems may exist -- # with libGL and libX11 but no GLX, but that world hasn't -- # arrived yet. -+ if(X11_FOUND AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS) - set(PIGLIT_HAS_GLX True) - add_definitions(-DPIGLIT_HAS_GLX) - endif() --- -2.17.1 -
meta/recipes-graphics/piglit/piglit_git.bb +1 -2
@@ -10,11 +10,10 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma file://0001-cmake-install-bash-completions-in-the-right-place.patch \ file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ - file://0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "1cd716180cfb6ef0c1fc54702460ef49e5115791" +SRCREV = "e300648a805d62101de341232d99bfec1cce78c5" # (when PV goes above 1.0 remove the trailing r) PV = "1.0+gitr${SRCPV}"
Signature · 1 line
2.30.2
PATCH 16/77 python3-setuptools-scm: upgrade 7.0.5 -> 7.1.0
In reply to Alexander Kanavin---
...-setuptools-scm_7.0.5.bb => python3-setuptools-scm_7.1.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-setuptools-scm_7.0.5.bb => python3-setuptools-scm_7.1.0.bb} (91%)meta/recipes-devtools/python/python3-setuptools-scm_7.1.0.bb renamed from meta/recipes-devtools/python/python3-setuptools-scm_7.0.5.bb +1 -1
@@ -4,7 +4,7 @@ DESCRIPTION = "setuptools_scm handles managing your Python package versions in S LICENSE = "MIT" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" -SRC_URI[sha256sum] = "031e13af771d6f892b941adb6ea04545bbf91ebc5ce68c78aaf3fff6e1fb4844" +SRC_URI[sha256sum] = "6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27" PYPI_PACKAGE = "setuptools_scm" inherit pypi python_setuptools_build_meta
Signature · 1 line
2.30.2
PATCH 17/77 python3-attrs: upgrade 22.1.0 -> 22.2.0
In reply to Alexander Kanavin---
.../python/{python3-attrs_22.1.0.bb => python3-attrs_22.2.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-attrs_22.1.0.bb => python3-attrs_22.2.0.bb} (82%)meta/recipes-devtools/python/python3-attrs_22.2.0.bb renamed from meta/recipes-devtools/python/python3-attrs_22.1.0.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.attrs.org/" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=5e55731824cf9205cfabeab9a0600887" -SRC_URI[sha256sum] = "29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6" +SRC_URI[sha256sum] = "c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99" inherit pypi python_setuptools_build_meta
Signature · 1 line
2.30.2
PATCH 18/77 python3-hatchling: upgrade 1.11.1 -> 1.12.1
In reply to Alexander Kanavin---
...{python3-hatchling_1.11.1.bb => python3-hatchling_1.12.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-hatchling_1.11.1.bb => python3-hatchling_1.12.1.bb} (84%)meta/recipes-devtools/python/python3-hatchling_1.12.1.bb renamed from meta/recipes-devtools/python/python3-hatchling_1.11.1.bb +1 -1
@@ -8,7 +8,7 @@ inherit pypi python_hatchling DEPENDS += "python3-pluggy-native python3-pathspec-native python3-packaging-native python3-editables-native" DEPENDS:remove:class-native = "python3-hatchling-native" -SRC_URI[sha256sum] = "9f84361f70cf3a7ab9543b0c3ecc64211ed2ba8a606a71eb6a473c1c9b08e1d0" +SRC_URI[sha256sum] = "5b36c903d4d76790b1c1f2b7c8f5446fb733fab6ce39b203401d2337d441b411" do_compile:prepend() { export PYTHONPATH=src
Signature · 1 line
2.30.2
PATCH 19/77 webkitgtk: upgrade 2.38.2 -> 2.38.3
In reply to Alexander Kanavin---
.../webkit/{webkitgtk_2.38.2.bb => webkitgtk_2.38.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-sato/webkit/{webkitgtk_2.38.2.bb => webkitgtk_2.38.3.bb} (98%)meta/recipes-sato/webkit/webkitgtk_2.38.3.bb renamed from meta/recipes-sato/webkit/webkitgtk_2.38.2.bb +1 -1
@@ -15,7 +15,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ file://0001-When-building-introspection-files-do-not-quote-CFLAG.patch \ file://0d3344e17d258106617b0e6d783d073b188a2548.patch \ " -SRC_URI[sha256sum] = "f3eb82899651f583b4d99cacd16af784a1a7710fce9e7b6807bd6ccde909fe3e" +SRC_URI[sha256sum] = "41f001d1ed448c6936b394a9f20e4640eebf83a7f08262df28504f7410604a5a" inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen
Signature · 1 line
2.30.2
PATCH 20/77 linux-firmware: upgrade 20221109 -> 20221214
In reply to Alexander KanavinLicense-Update: additional files
---
...{linux-firmware_20221109.bb => linux-firmware_20221214.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-kernel/linux-firmware/{linux-firmware_20221109.bb => linux-firmware_20221214.bb} (99%)meta/recipes-kernel/linux-firmware/linux-firmware_20221214.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20221109.bb +2 -2
@@ -132,7 +132,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \ " # WHENCE checksum is defined separately to ease overriding it if # class-devupstream is selected. -WHENCE_CHKSUM = "ab4ba608dc4b757716871f9be033f0f1" +WHENCE_CHKSUM = "bf7c716d16e48fe118c6209f99b13253" # These are not common licenses, set NO_GENERIC_LICENSE for them # so that the license files will be copied from fetched source
@@ -209,7 +209,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw # Pin this to the 20220509 release, override this in local.conf SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae" -SRC_URI[sha256sum] = "c0ddffbbcf30f2e015bddd5c6d3ce1f13976b906aceabda4a57e3c41a3190701" +SRC_URI[sha256sum] = "e793783e92acbde549965521462d1d1327827360664cf242dbda08f075654331" inherit allarch
Signature · 1 line
2.30.2
PATCH 21/77 harfbuzz: upgrade 5.3.1 -> 6.0.0
In reply to Alexander Kanavin---
.../harfbuzz/{harfbuzz_5.3.1.bb => harfbuzz_6.0.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-graphics/harfbuzz/{harfbuzz_5.3.1.bb => harfbuzz_6.0.0.bb} (95%)meta/recipes-graphics/harfbuzz/harfbuzz_6.0.0.bb renamed from meta/recipes-graphics/harfbuzz/harfbuzz_5.3.1.bb +1 -1
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ee0f16281694fb6aa689cca1e0fb3da \ " SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BPN}-${PV}.tar.xz" -SRC_URI[sha256sum] = "4a6ce097b75a8121facc4ba83b5b083bfec657f45b003cd5a3424f2ae6b4434d" +SRC_URI[sha256sum] = "1d1010a1751d076d5291e433c138502a794d679a7498d1268ee21e2d4a140eb4" inherit meson pkgconfig lib_package gtk-doc gobject-introspection github-releases
Signature · 1 line
2.30.2
PATCH 22/77 python3-pytz: upgrade 2022.6 -> 2022.7
In reply to Alexander Kanavin---
.../python/{python3-pytz_2022.6.bb => python3-pytz_2022.7.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-pytz_2022.6.bb => python3-pytz_2022.7.bb} (89%)meta/recipes-devtools/python/python3-pytz_2022.7.bb renamed from meta/recipes-devtools/python/python3-pytz_2022.6.bb +1 -1
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1a67fc46c1b596cce5d21209bbe75999" inherit pypi setuptools3 ptest -SRC_URI[sha256sum] = "e89512406b793ca39f5971bc999cc538ce125c0e51c27941bef4568b460095e2" +SRC_URI[sha256sum] = "7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a" RDEPENDS:${PN}:class-target += "\ ${PYTHON_PN}-datetime \
Signature · 1 line
2.30.2
PATCH 23/77 strace: upgrade 6.0 -> 6.1
In reply to Alexander Kanavin---
meta/recipes-devtools/strace/{strace_6.0.bb => strace_6.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/strace/{strace_6.0.bb => strace_6.1.bb} (96%)meta/recipes-devtools/strace/strace_6.1.bb renamed from meta/recipes-devtools/strace/strace_6.0.bb +1 -1
@@ -16,7 +16,7 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ file://0001-configure-Use-autoconf-macro-to-detect-largefile-sup.patch \ file://0002-tests-Replace-off64_t-with-off_t.patch \ " -SRC_URI[sha256sum] = "92d720a666855e9f1c6a11512fd6e99674a82bbfe1442557815f2ce8e1293338" +SRC_URI[sha256sum] = "2579e9cec37dbb786f6ea0bebd15f40dd561ef2bde2a2a2ecdce5963b01859fd" inherit autotools ptest
Signature · 1 line
2.30.2
PATCH 24/77 python3-pycryptodome: upgrade 3.15.0 -> 3.16.0
In reply to Alexander Kanavin--- meta/recipes-devtools/python/python3-pycryptodome_3.15.0.bb | 5 ----- meta/recipes-devtools/python/python3-pycryptodome_3.16.0.bb | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3-pycryptodome_3.15.0.bb create mode 100644 meta/recipes-devtools/python/python3-pycryptodome_3.16.0.bb
meta/recipes-devtools/python/python3-pycryptodome_3.15.0.bb deleted +0 -5
@@ -1,5 +0,0 @@ -require python-pycryptodome.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "9135dddad504592bcc18b0d2d95ce86c3a5ea87ec6447ef25cfedea12d6018b8" -
meta/recipes-devtools/python/python3-pycryptodome_3.16.0.bb new file +5 -0
@@ -0,0 +1,5 @@ +require python-pycryptodome.inc +inherit setuptools3 + +SRC_URI[sha256sum] = "0e45d2d852a66ecfb904f090c3f87dc0dfb89a499570abad8590f10d9cffb350" +
Signature · 1 line
2.30.2
PATCH 25/77 meson: upgrade 0.64.0 -> 1.0.0
In reply to Alexander Kanavin---
meta/recipes-devtools/meson/{meson_0.64.0.bb => meson_1.0.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/meson/{meson_0.64.0.bb => meson_1.0.0.bb} (98%)meta/recipes-devtools/meson/meson_1.0.0.bb renamed from meta/recipes-devtools/meson/meson_0.64.0.bb +1 -1
@@ -17,7 +17,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/meson-${PV}.tar.gz \ file://0002-Support-building-allarch-recipes-again.patch \ file://0001-Check-for-clang-before-guessing-gcc-or-lcc.patch \ " -SRC_URI[sha256sum] = "c5e27e091c2a35b9049e152a6535045ebbd057253aeb67856de6ecbb7b917bab" +SRC_URI[sha256sum] = "aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05" inherit python_setuptools_build_meta github-releases
Signature · 1 line
2.30.2
PATCH 26/77 xwayland: upgrade 22.1.5 -> 22.1.7
In reply to Alexander Kanavin---
.../xwayland/{xwayland_22.1.5.bb => xwayland_22.1.7.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-graphics/xwayland/{xwayland_22.1.5.bb => xwayland_22.1.7.bb} (95%)meta/recipes-graphics/xwayland/xwayland_22.1.7.bb renamed from meta/recipes-graphics/xwayland/xwayland_22.1.5.bb +1 -1
@@ -10,7 +10,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880" SRC_URI = "https://www.x.org/archive/individual/xserver/xwayland-${PV}.tar.xz" -SRC_URI[sha256sum] = "e317ac1f119f8321654921761420901e4abd95585a8c763ce26af3b045ac1672" +SRC_URI[sha256sum] = "d53afac6c71953f5cf66d03d289dacd8961da5bd309c1dff125d5955d9db5f76" UPSTREAM_CHECK_REGEX = "xwayland-(?P<pver>\d+(\.(?!90\d)\d+)+)\.tar"
Signature · 1 line
2.30.2
PATCH 27/77 python3-pyrsistent: upgrade 0.19.2 -> 0.19.3
In reply to Alexander Kanavin---
...ython3-pyrsistent_0.19.2.bb => python3-pyrsistent_0.19.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-pyrsistent_0.19.2.bb => python3-pyrsistent_0.19.3.bb} (79%)meta/recipes-devtools/python/python3-pyrsistent_0.19.3.bb renamed from meta/recipes-devtools/python/python3-pyrsistent_0.19.2.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/tobgu/pyrsistent" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.mit;md5=b695eb9c6e7a6fb1b1bc2d193c42776e" -SRC_URI[sha256sum] = "bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2" +SRC_URI[sha256sum] = "1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440" inherit pypi python_setuptools_build_meta
Signature · 1 line
2.30.2
PATCH 28/77 file: upgrade 5.43 -> 5.44
In reply to Alexander Kanavin---
meta/recipes-devtools/file/{file_5.43.bb => file_5.44.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/file/{file_5.43.bb => file_5.44.bb} (97%)meta/recipes-devtools/file/file_5.44.bb renamed from meta/recipes-devtools/file/file_5.43.bb +1 -1
@@ -13,7 +13,7 @@ DEPENDS:class-native = "bzip2-replacement-native" SRC_URI = "git://github.com/file/file.git;branch=master;protocol=https" -SRCREV = "011778a2877f75597ed83c1a2716d917770920ee" +SRCREV = "b92eed41b1bc0739c5c5d70c444e0c574429321b" S = "${WORKDIR}/git" inherit autotools update-alternatives
Signature · 1 line
2.30.2
PATCH 29/77 python3-subunit: upgrade 1.4.1 -> 1.4.2
In reply to Alexander Kanavin---
.../{python3-subunit_1.4.1.bb => python3-subunit_1.4.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-subunit_1.4.1.bb => python3-subunit_1.4.2.bb} (81%)meta/recipes-devtools/python/python3-subunit_1.4.2.bb renamed from meta/recipes-devtools/python/python3-subunit_1.4.1.bb +1 -1
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://README.rst;beginline=1;endline=20;md5=909c08e291647fd PYPI_PACKAGE = "python-subunit" -SRC_URI[sha256sum] = "5fe5686904428501376e7b11593226d37638fbd981c1fc9ed6aac180525d78c1" +SRC_URI[sha256sum] = "2988d324d55ec35dd037e502e3f74ac38f4e457bd44ee0edf5e898f7ee1134d4" inherit pypi setuptools3
Signature · 1 line
2.30.2
PATCH 30/77 python3-zipp: upgrade 3.10.0 -> 3.11.0
In reply to Alexander Kanavin---
.../python/{python3-zipp_3.10.0.bb => python3-zipp_3.11.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-zipp_3.10.0.bb => python3-zipp_3.11.0.bb} (85%)meta/recipes-devtools/python/python3-zipp_3.11.0.bb renamed from meta/recipes-devtools/python/python3-zipp_3.10.0.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/jaraco/zipp" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE;md5=7a7126e068206290f3fe9f8d6c713ea6" -SRC_URI[sha256sum] = "7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8" +SRC_URI[sha256sum] = "a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766" DEPENDS += "${PYTHON_PN}-setuptools-scm-native"
Signature · 1 line
2.30.2
PATCH 31/77 python3-cryptography: upgrade 38.0.3 -> 38.0.4
In reply to Alexander Kanavin---
...n3-cryptography_38.0.3.bb => python3-cryptography_38.0.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-cryptography_38.0.3.bb => python3-cryptography_38.0.4.bb} (95%)meta/recipes-devtools/python/python3-cryptography_38.0.4.bb renamed from meta/recipes-devtools/python/python3-cryptography_38.0.3.bb +1 -1
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=bf405a8056a6647e7d077b0e7bc36aba \ " LDSHARED += "-pthread" -SRC_URI[sha256sum] = "bfbe6ee19615b07a98b1d2287d6a6073f734735b49ee45b11324d85efc4d5cbd" +SRC_URI[sha256sum] = "175c1a818b87c9ac80bb7377f5520b7f31b3ef2a0004e2420319beadedb67290" SRC_URI += "\ file://0002-Cargo.toml-edition-2018-2021.patch \
Signature · 1 line
2.30.2
PATCH 32/77 sqlite3: upgrade 3.40.0 -> 3.40.1
In reply to Alexander Kanavin---
.../sqlite/{sqlite3_3.40.0.bb => sqlite3_3.40.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/sqlite/{sqlite3_3.40.0.bb => sqlite3_3.40.1.bb} (86%)meta/recipes-support/sqlite/sqlite3_3.40.1.bb renamed from meta/recipes-support/sqlite/sqlite3_3.40.0.bb +1 -1
@@ -4,7 +4,7 @@ LICENSE = "PD" LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz" -SRC_URI[sha256sum] = "0333552076d2700c75352256e91c78bf5cd62491589ba0c69aed0a81868980e7" +SRC_URI[sha256sum] = "2c5dea207fa508d765af1ef620b637dcb06572afa6f01f0815bd5bbf864b33d9" # -19242 is only an issue in specific development branch commits CVE_CHECK_IGNORE += "CVE-2019-19242"
Signature · 1 line
2.30.2
PATCH 33/77 logrotate: upgrade 3.20.1 -> 3.21.0
In reply to Alexander Kanavin---
.../logrotate/{logrotate_3.20.1.bb => logrotate_3.21.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/logrotate/{logrotate_3.20.1.bb => logrotate_3.21.0.bb} (97%)meta/recipes-extended/logrotate/logrotate_3.21.0.bb renamed from meta/recipes-extended/logrotate/logrotate_3.20.1.bb +1 -1
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz" -SRC_URI[sha256sum] = "742f6d6e18eceffa49a4bacd933686d3e42931cfccfb694d7f6369b704e5d094" +SRC_URI[sha256sum] = "8fa12015e3b8415c121fc9c0ca53aa872f7b0702f543afda7e32b6c4900f6516" # These CVEs are debian, gentoo or SUSE specific on the way logrotate was installed/used CVE_CHECK_IGNORE += "CVE-2011-1548 CVE-2011-1549 CVE-2011-1550"
Signature · 1 line
2.30.2
PATCH 34/77 python3-importlib-metadata: upgrade 5.0.0 -> 5.2.0
In reply to Alexander Kanavin---
...ib-metadata_5.0.0.bb => python3-importlib-metadata_5.2.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-importlib-metadata_5.0.0.bb => python3-importlib-metadata_5.2.0.bb} (88%)meta/recipes-devtools/python/python3-importlib-metadata_5.2.0.bb renamed from meta/recipes-devtools/python/python3-importlib-metadata_5.0.0.bb +1 -1
@@ -8,7 +8,7 @@ inherit pypi python_setuptools_build_meta PYPI_PACKAGE = "importlib_metadata" UPSTREAM_CHECK_REGEX = "/importlib-metadata/(?P<pver>(\d+[\.\-_]*)+)/" -SRC_URI[sha256sum] = "da31db32b304314d044d3c12c79bd59e307889b287ad12ff387b3500835fc2ab" +SRC_URI[sha256sum] = "404d48d62bba0b7a77ff9d405efd91501bef2e67ff4ace0bed40a0cf28c3c7cd" S = "${WORKDIR}/importlib_metadata-${PV}"
Signature · 1 line
2.30.2
PATCH 35/77 python3-numpy: upgrade 1.23.4 -> 1.24.1
In reply to Alexander Kanavin---
...y-do-not-write-full-path-to-output-f.patch | 28 -------------------
...umpy_1.23.4.bb => python3-numpy_1.24.1.bb} | 3 +-
2 files changed, 1 insertion(+), 30 deletions(-)
delete mode 100644 meta/recipes-devtools/python/python3-numpy/0001-generate_umath.py-do-not-write-full-path-to-output-f.patch
rename meta/recipes-devtools/python/{python3-numpy_1.23.4.bb => python3-numpy_1.24.1.bb} (93%)meta/recipes-devtools/python/python3-numpy/0001-generate_umath.py-do-not-write-full-path-to-output-f.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From 3c7deaa3a961a0f3ce4ff108468e3d70118f17b3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 9 Jun 2022 17:23:42 +0200 -Subject: [PATCH] generate_umath.py: do not write full path to output files - -This helps reproducibility as those paths vary in automated -build environments. - -Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/21707] -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - numpy/core/code_generators/generate_umath.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py -index 292d9e0..df37941 100644 ---- a/numpy/core/code_generators/generate_umath.py -+++ b/numpy/core/code_generators/generate_umath.py -@@ -1233,7 +1233,7 @@ def make_code(funcdict, filename): - - return 0; - } -- """) % (filename, code1, code2, code3) -+ """) % (os.path.basename(filename), code1, code2, code3) - return code - -
meta/recipes-devtools/python/python3-numpy_1.24.1.bb renamed from meta/recipes-devtools/python/python3-numpy_1.23.4.bb +1 -2
@@ -11,9 +11,8 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ file://0001-numpy-core-Define-RISCV-32-support.patch \ file://run-ptest \ - file://0001-generate_umath.py-do-not-write-full-path-to-output-f.patch \ " -SRC_URI[sha256sum] = "ed2cc92af0efad20198638c69bb0fc2870a58dabfba6eb722c933b48556c686c" +SRC_URI[sha256sum] = "2386da9a471cc00a1f47845e27d916d5ec5346ae9696e01a8a34760858fe9dd2" GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases" UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
Signature · 1 line
2.30.2
PATCH 36/77 xserver-xorg: upgrade 21.1.4 -> 21.1.6
In reply to Alexander Kanavin---
...possible-memleaks-in-XkbGetKbdByName.patch | 63 -------------------
...ntedString-against-request-length-at.patch | 38 -----------
...-xorg_21.1.4.bb => xserver-xorg_21.1.6.bb} | 4 +-
3 files changed, 1 insertion(+), 104 deletions(-)
delete mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xkb-fix-some-possible-memleaks-in-XkbGetKbdByName.patch
delete mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xkb-proof-GetCountedString-against-request-length-at.patch
rename meta/recipes-graphics/xorg-xserver/{xserver-xorg_21.1.4.bb => xserver-xorg_21.1.6.bb} (80%)meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xkb-fix-some-possible-memleaks-in-XkbGetKbdByName.patch deleted +0 -63
@@ -1,63 +0,0 @@ -CVE: CVE-2022-3551 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 18f91b950e22c2a342a4fbc55e9ddf7534a707d2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer <[email protected]> -Date: Wed, 13 Jul 2022 11:23:09 +1000 -Subject: [PATCH] xkb: fix some possible memleaks in XkbGetKbdByName - -GetComponentByName returns an allocated string, so let's free that if we -fail somewhere. - -Signed-off-by: Peter Hutterer <[email protected]> ---- - xkb/xkb.c | 26 ++++++++++++++++++++------ - 1 file changed, 20 insertions(+), 6 deletions(-) - -diff --git a/xkb/xkb.c b/xkb/xkb.c -index 4692895db..b79a269e3 100644 ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5935,18 +5935,32 @@ ProcXkbGetKbdByName(ClientPtr client) - xkb = dev->key->xkbInfo->desc; - status = Success; - str = (unsigned char *) &stuff[1]; -- if (GetComponentSpec(&str, TRUE, &status)) /* keymap, unsupported */ -- return BadMatch; -+ { -+ char *keymap = GetComponentSpec(&str, TRUE, &status); /* keymap, unsupported */ -+ if (keymap) { -+ free(keymap); -+ return BadMatch; -+ } -+ } - names.keycodes = GetComponentSpec(&str, TRUE, &status); - names.types = GetComponentSpec(&str, TRUE, &status); - names.compat = GetComponentSpec(&str, TRUE, &status); - names.symbols = GetComponentSpec(&str, TRUE, &status); - names.geometry = GetComponentSpec(&str, TRUE, &status); -- if (status != Success) -+ if (status == Success) { -+ len = str - ((unsigned char *) stuff); -+ if ((XkbPaddedSize(len) / 4) != stuff->length) -+ status = BadLength; -+ } -+ -+ if (status != Success) { -+ free(names.keycodes); -+ free(names.types); -+ free(names.compat); -+ free(names.symbols); -+ free(names.geometry); - return status; -- len = str - ((unsigned char *) stuff); -- if ((XkbPaddedSize(len) / 4) != stuff->length) -- return BadLength; -+ } - - CHK_MASK_LEGAL(0x01, stuff->want, XkbGBN_AllComponentsMask); - CHK_MASK_LEGAL(0x02, stuff->need, XkbGBN_AllComponentsMask); --- -2.34.1 -
meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-xkb-proof-GetCountedString-against-request-length-at.patch deleted +0 -38
@@ -1,38 +0,0 @@ -CVE: CVE-2022-3550 -Upstream-Status: Backport -Signed-off-by: Ross Burton <[email protected]> - -From 11beef0b7f1ed290348e45618e5fa0d2bffcb72e Mon Sep 17 00:00:00 2001 -From: Peter Hutterer <[email protected]> -Date: Tue, 5 Jul 2022 12:06:20 +1000 -Subject: [PATCH] xkb: proof GetCountedString against request length attacks - -GetCountedString did a check for the whole string to be within the -request buffer but not for the initial 2 bytes that contain the length -field. A swapped client could send a malformed request to trigger a -swaps() on those bytes, writing into random memory. - -Signed-off-by: Peter Hutterer <[email protected]> ---- - xkb/xkb.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/xkb/xkb.c b/xkb/xkb.c -index f42f59ef3..1841cff26 100644 ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5137,6 +5137,11 @@ _GetCountedString(char **wire_inout, ClientPtr client, char **str) - CARD16 len; - - wire = *wire_inout; -+ -+ if (client->req_len < -+ bytes_to_int32(wire + 2 - (char *) client->requestBuffer)) -+ return BadValue; -+ - len = *(CARD16 *) wire; - if (client->swapped) { - swaps(&len); --- -2.34.1 -
meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.6.bb renamed from meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.4.bb +1 -3
@@ -2,10 +2,8 @@ require xserver-xorg.inc SRC_URI += "file://0001-xf86pciBus.c-use-Intel-ddx-only-for-pre-gen4-hardwar.patch \ file://0001-Avoid-duplicate-definitions-of-IOPortBase.patch \ - file://0001-xkb-fix-some-possible-memleaks-in-XkbGetKbdByName.patch \ - file://0001-xkb-proof-GetCountedString-against-request-length-at.patch \ " -SRC_URI[sha256sum] = "5cc4be8ee47edb58d4a90e603a59d56b40291ad38371b0bd2471fc3cbee1c587" +SRC_URI[sha256sum] = "1eb86ed674d042b6c8b1f9135e59395cbbca35ed551b122f73a7d8bb3bb22484" # These extensions are now integrated into the server, so declare the migration # path for in-place upgrades.
Signature · 1 line
2.30.2
PATCH 37/77 puzzles: upgrade to latest revision
In reply to Alexander Kanavin--- meta/recipes-sato/puzzles/puzzles_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-sato/puzzles/puzzles_git.bb +1 -1
@@ -10,7 +10,7 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "git://git.tartarus.org/simon/puzzles.git;branch=main" UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "06f6e878a0b588c513024c3498b68a3c87594ab7" +SRCREV = "14c025d192579961d1ade51f2a322bd765aef0e5" PE = "2" PV = "0.0+git${SRCPV}"
Signature · 1 line
2.30.2
PATCH 38/77 vte: upgrade 0.70.1 -> 0.70.2
In reply to Alexander Kanavin---
meta/recipes-support/vte/{vte_0.70.1.bb => vte_0.70.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/vte/{vte_0.70.1.bb => vte_0.70.2.bb} (94%)meta/recipes-support/vte/vte_0.70.2.bb renamed from meta/recipes-support/vte/vte_0.70.1.bb +1 -1
@@ -21,7 +21,7 @@ inherit gnomebase gi-docgen features_check upstream-version-is-even gobject-intr # vapigen.m4 is required when vala is not present (but the one from vala should be used normally) SRC_URI += "file://0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch" -SRC_URI[archive.sha256sum] = "1f4601cbfea5302b96902208c8f185e5b18b259b5358bc93cf392bf59871c5b6" +SRC_URI[archive.sha256sum] = "4d15b4380de3f564d57eabd006389c407c705df5b0c70030fdcc24971a334d80" ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
Signature · 1 line
2.30.2
PATCH 39/77 libpsl: upgrade 0.21.1 -> 0.21.2
In reply to Alexander KanavinLicense-Update: copyright years
---
.../libpsl/{libpsl_0.21.1.bb => libpsl_0.21.2.bb} | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
rename meta/recipes-support/libpsl/{libpsl_0.21.1.bb => libpsl_0.21.2.bb} (77%)meta/recipes-support/libpsl/libpsl_0.21.2.bb renamed from meta/recipes-support/libpsl/libpsl_0.21.1.bb +4 -3
@@ -7,12 +7,13 @@ HOMEPAGE = "https://rockdaboot.github.io/libpsl/" BUGTRACKER = "https://github.com/rockdaboot/libpsl/issues" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5437030d9e4fbe7267ced058ddb8a7f5 \ - file://COPYING;md5=f41d10997a12da5ee3c24ceeb0148d18" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6f40ab7fcf5ff18f3ff7f4b0860493fa \ + file://COPYING;md5=6f40ab7fcf5ff18f3ff7f4b0860493fa \ + " SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.gz \ " -SRC_URI[sha256sum] = "ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c" +SRC_URI[sha256sum] = "e35991b6e17001afa2c0ca3b10c357650602b92596209b7492802f3768a6285f" GITHUB_BASE_URI = "https://github.com/rockdaboot/libpsl/releases"
Signature · 1 line
2.30.2
PATCH 40/77 libtest-fatal-perl: upgrade 0.016 -> 0.017
In reply to Alexander KanavinLicense-Update: formatting
---
...ibtest-fatal-perl_0.016.bb => libtest-fatal-perl_0.017.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/perl/{libtest-fatal-perl_0.016.bb => libtest-fatal-perl_0.017.bb} (85%)meta/recipes-devtools/perl/libtest-fatal-perl_0.017.bb renamed from meta/recipes-devtools/perl/libtest-fatal-perl_0.016.bb +2 -2
@@ -7,11 +7,11 @@ BUGTRACKER = "https://github.com/rjbs/Test-Fatal/issues" SECTION = "libs" LICENSE = "Artistic-1.0 | GPL-1.0-or-later" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f7c73bf24be1bc7759bde9c15000db6c" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b5c851290cab1dda12fcfb0e9ec43639" SRC_URI = "${CPAN_MIRROR}/authors/id/R/RJ/RJBS/Test-Fatal-${PV}.tar.gz" -SRC_URI[sha256sum] = "7283d430f2ba2030b8cd979ae3039d3f1b2ec3dde1a11ca6ae09f992a66f788f" +SRC_URI[sha256sum] = "37dfffdafb84b762efe96b02fb2aa41f37026c73e6b83590db76229697f3c4a6" S = "${WORKDIR}/Test-Fatal-${PV}"
Signature · 1 line
2.30.2
PATCH 41/77 python3-pathspec: upgrade 0.10.1 -> 0.10.3
In reply to Alexander Kanavin---
.../{python3-pathspec_0.10.1.bb => python3-pathspec_0.10.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-pathspec_0.10.1.bb => python3-pathspec_0.10.3.bb} (78%)meta/recipes-devtools/python/python3-pathspec_0.10.3.bb renamed from meta/recipes-devtools/python/python3-pathspec_0.10.1.bb +1 -1
@@ -4,7 +4,7 @@ SECTION = "devel/python" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad" -SRC_URI[sha256sum] = "7ace6161b621d31e7902eb6b5ae148d12cfd23f4a249b9ffb6b9fee12084323d" +SRC_URI[sha256sum] = "56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6" inherit pypi setuptools3
Signature · 1 line
2.30.2
PATCH 42/77 lsof: upgrade 4.96.4 -> 4.96.5
In reply to Alexander Kanavin---
meta/recipes-extended/lsof/{lsof_4.96.4.bb => lsof_4.96.5.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/lsof/{lsof_4.96.4.bb => lsof_4.96.5.bb} (96%)meta/recipes-extended/lsof/lsof_4.96.5.bb renamed from meta/recipes-extended/lsof/lsof_4.96.4.bb +1 -1
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429 SRC_URI = "git://github.com/lsof-org/lsof;branch=master;protocol=https \ file://remove-host-information.patch" -SRCREV = "669c33a253e414feb60fbbcf2984c25dc413cd75" +SRCREV = "898916d4c7c390ea4610aebaf1d32b8a3c49f26b" S = "${WORKDIR}/git"
Signature · 1 line
2.30.2
PATCH 43/77 python3-urllib3: upgrade 1.26.12 -> 1.26.13
In reply to Alexander Kanavin---
.../{python3-urllib3_1.26.12.bb => python3-urllib3_1.26.13.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-urllib3_1.26.12.bb => python3-urllib3_1.26.13.bb} (86%)meta/recipes-devtools/python/python3-urllib3_1.26.13.bb renamed from meta/recipes-devtools/python/python3-urllib3_1.26.12.bb +1 -1
@@ -3,7 +3,7 @@ HOMEPAGE = "https://github.com/shazow/urllib3" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c2823cb995439c984fd62a973d79815c" -SRC_URI[sha256sum] = "3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e" +SRC_URI[sha256sum] = "c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8" inherit pypi setuptools3
Signature · 1 line
2.30.2
PATCH 44/77 python3-cryptography-vectors: upgrade 38.0.3 -> 38.0.4
In reply to Alexander Kanavin---
...vectors_38.0.3.bb => python3-cryptography-vectors_38.0.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-cryptography-vectors_38.0.3.bb => python3-cryptography-vectors_38.0.4.bb} (90%)meta/recipes-devtools/python/python3-cryptography-vectors_38.0.4.bb renamed from meta/recipes-devtools/python/python3-cryptography-vectors_38.0.3.bb +1 -1
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=8c3617db4fb6fae01f1d253ab91511e4 \ # NOTE: Make sure to keep this recipe at the same version as python3-cryptography # Upgrade both recipes at the same time -SRC_URI[sha256sum] = "1cdafd42f5348d77e4e7e4791aefd1f62b16bd552a0274afc9346533fe32e925" +SRC_URI[sha256sum] = "6ec62695bec5df810288ddceae998ae691cdb8a162808d6cbc960d3deb9a7db1" PYPI_PACKAGE = "cryptography_vectors"
Signature · 1 line
2.30.2
PATCH 45/77 python3-setuptools: upgrade 65.5.1 -> 65.6.3
In reply to Alexander Kanavin---
.../0001-conditionally-do-not-fetch-code-by-easy_install.patch | 2 +-
...ython3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} (95%)meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch +1 -1
@@ -1,4 +1,4 @@ -From a0e0873a8ee6674d43e604d66bf66d94fc8eeb6f Mon Sep 17 00:00:00 2001 +From 2e57369593ede5336f947e7b9903ebc673f98fef Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 17 Jul 2018 10:13:38 +0800 Subject: [PATCH] conditionally do not fetch code by easy_install
meta/recipes-devtools/python/python3-setuptools_65.6.3.bb renamed from meta/recipes-devtools/python/python3-setuptools_65.5.1.bb +1 -1
@@ -11,7 +11,7 @@ SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-e SRC_URI += "file://0001-change-shebang-to-python3.patch \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f" +SRC_URI[sha256sum] = "a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75" DEPENDS += "${PYTHON_PN}"
Signature · 1 line
2.30.2
Re: [OE-core] [PATCH 45/77] python3-setuptools: upgrade 65.5.1 -> 65.6.3
This setuptools upgrade is regressing nftables build
| make[2]: Entering directory '/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | cd ../../nftables-1.0.6/py && \
| /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/bin/python3-native/python3setup.py build --build-base /mnt/b/yoe/master/build/tmp/work/cort exa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py
| Traceback (most recent call last):
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/nftables-1.0.6/py/setup.py",
line 5, in <module>
| setup(name='nftables',
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 185, in setup
| return run_commands(dist) | ^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 201, in run_commands
| dist.run_commands()
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 969, in run_commands
| self.run_command(cmd)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 986, in run_command
| cmd_obj = self.get_command_obj(command) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj | cmd_obj = self.command_obj[command] = klass(self) | ^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/__init__.py",
line 158, in __init__
| super().__init__(dist)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py",
line 61, in __init__
| raise TypeError("dist must be a Distribution instance")
| TypeError: dist must be a Distribution instance
| make[2]: *** [Makefile:455: all-local] Error 1
| make[2]: Leaving directory'/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | make[1]: *** [Makefile:478: all-recursive] Error 1
| make[1]: Leaving directory '/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build' | make: *** [Makefile:387: all] Error 2
Quoted 46 lines · Alexander Kanavin
Signed-off-by Alexander Kanavin <[email protected]>--- .../0001-conditionally-do-not-fetch-code-by-easy_install.patch | 2 +- ...ython3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} (95%)meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch +1
-1@@ -1,4 +1,4 @@ -From a0e0873a8ee6674d43e604d66bf66d94fc8eeb6f Mon Sep 17 00:00:00 2001 +From 2e57369593ede5336f947e7b9903ebc673f98fef Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 17 Jul 2018 10:13:38 +0800 Subject: [PATCH] conditionally do not fetch code by easy_installmeta/recipes-devtools/python/python3-setuptools_65.6.3.bb renamed from meta/recipes-devtools/python/python3-setuptools_65.5.1.bb +1
-2@@ -11,7 +11,7 @@ SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-e SRC_URI += "file://0001-change-shebang-to-python3.patch \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f" +SRC_URI[sha256sum] = "a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75" DEPENDS += "${PYTHON_PN}" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175430): https://lists.openembedded.org/g/openembedded-core/message/175430
Mute This Topic: https://lists.openembedded.org/mt/96047915/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 45/77] python3-setuptools: upgrade 65.5.1 -> 65.6.3
I sent a patch for that to oe-devel.
Alex
Quoted 95 lines · Khem Raj
This setuptools upgrade is regressing nftables build
| make[2]: Entering directory '
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | cd ../../nftables-1.0.6/py && \
|/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/bin/python3-native/python3setup.pybuild --build-base/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py
| Traceback (most recent call last):
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/nftables-1.0.6/py/setup.py",
line 5, in <module>
| setup(name='nftables',
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 185, in setup| return run_commands(dist) | ^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",line 201, in
run_commands
|dist.run_commands()
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 969, inrun_commands
|self.run_command(cmd)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 986, inrun_command| cmd_obj = self.get_command_obj(command) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj | cmd_obj = self.command_obj[command] = klass(self) | ^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/__init__.py",line 158, in
__init__
| super().__init__(dist)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py",
line 61, in__init__| raise TypeError("dist must be a Distribution instance") | TypeError: dist must be a Distribution instance | make[2]: *** [Makefile:455: all-local] Error 1 | make[2]: Leaving directory'
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | make[1]: *** [Makefile:478: all-recursive] Error 1
| make[1]: Leaving directory '/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build' | make: *** [Makefile:387: all] Error 2Quoted 46 lines · Alexander Kanavin
Signed-off-by Alexander Kanavin <[email protected]>--- .../0001-conditionally-do-not-fetch-code-by-easy_install.patch | 2 +- ...ython3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} (95%)meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch +1
-1@@ -1,4 +1,4 @@ -From a0e0873a8ee6674d43e604d66bf66d94fc8eeb6f Mon Sep 17 00:00:00 2001 +From 2e57369593ede5336f947e7b9903ebc673f98fef Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 17 Jul 2018 10:13:38 +0800 Subject: [PATCH] conditionally do not fetch code by easy_installmeta/recipes-devtools/python/python3-setuptools_65.6.3.bb renamed from meta/recipes-devtools/python/python3-setuptools_65.5.1.bb +1
-2@@ -11,7 +11,7 @@ SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-e SRC_URI += "file://0001-change-shebang-to-python3.patch \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f" +SRC_URI[sha256sum] = "a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75" DEPENDS += "${PYTHON_PN}" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175430): https://lists.openembedded.org/g/openembedded-core/message/175430
Mute This Topic: https://lists.openembedded.org/mt/96047915/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 45/77] python3-setuptools: upgrade 65.5.1 -> 65.6.3
Quoted 2 lines · Alexander Kanavin
I sent a patch for that to oe-devel.
Thanks
Quoted 99 lines
Alex
Quoted 95 lines · Khem Raj
This setuptools upgrade is regressing nftables build
| make[2]: Entering directory '
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | cd ../../nftables-1.0.6/py && \
|/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/bin/python3-native/python3setup.pybuild --build-base/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py
| Traceback (most recent call last):
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/nftables-1.0.6/py/setup.py",
line 5, in <module>
| setup(name='nftables',
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",
line 185, in setup| return run_commands(dist) | ^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py",line 201, in
run_commands
|dist.run_commands()
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 969, inrun_commands
|self.run_command(cmd)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py",
line 986, inrun_command| cmd_obj = self.get_command_obj(command) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 861, in get_command_obj | cmd_obj = self.command_obj[command] = klass(self) | ^^^^^^^^^^^ | File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/__init__.py",line 158, in
__init__
| super().__init__(dist)
| File "/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/recipe-sysroot-native/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py",
line 61, in__init__| raise TypeError("dist must be a Distribution instance") | TypeError: dist must be a Distribution instance | make[2]: *** [Makefile:455: all-local] Error 1 | make[2]: Leaving directory'
/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build/py' | make[1]: *** [Makefile:478: all-recursive] Error 1
| make[1]: Leaving directory '/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nftables/1.0.6-r0/build' | make: *** [Makefile:387: all] Error 2Quoted 46 lines · Alexander Kanavin
Signed-off-by Alexander Kanavin <[email protected]>--- .../0001-conditionally-do-not-fetch-code-by-easy_install.patch | 2 +- ...ython3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-devtools/python/{python3-setuptools_65.5.1.bb => python3-setuptools_65.6.3.bb} (95%)meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch +1
-1@@ -1,4 +1,4 @@ -From a0e0873a8ee6674d43e604d66bf66d94fc8eeb6f Mon Sep 17 00:00:00 2001 +From 2e57369593ede5336f947e7b9903ebc673f98fef Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Tue, 17 Jul 2018 10:13:38 +0800 Subject: [PATCH] conditionally do not fetch code by easy_installmeta/recipes-devtools/python/python3-setuptools_65.6.3.bb renamed from meta/recipes-devtools/python/python3-setuptools_65.5.1.bb +1
-2@@ -11,7 +11,7 @@ SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-e SRC_URI += "file://0001-change-shebang-to-python3.patch \ file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" -SRC_URI[sha256sum] = "e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f" +SRC_URI[sha256sum] = "a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75" DEPENDS += "${PYTHON_PN}" --2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175430): https://lists.openembedded.org/g/openembedded-core/message/175430
Mute This Topic: https://lists.openembedded.org/mt/96047915/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 46/77 libsdl2: upgrade 2.26.0 -> 2.26.1
In reply to Alexander Kanavin---
.../libsdl2/{libsdl2_2.26.0.bb => libsdl2_2.26.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-graphics/libsdl2/{libsdl2_2.26.0.bb => libsdl2_2.26.1.bb} (97%)meta/recipes-graphics/libsdl2/libsdl2_2.26.1.bb renamed from meta/recipes-graphics/libsdl2/libsdl2_2.26.0.bb +1 -1
@@ -25,7 +25,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz" S = "${WORKDIR}/SDL2-${PV}" -SRC_URI[sha256sum] = "8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295" +SRC_URI[sha256sum] = "02537cc7ebd74071631038b237ec4bfbb3f4830ba019e569434da33f42373e04" inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even
Signature · 1 line
2.30.2
PATCH 47/77 python3-gitdb: upgrade 4.0.9 -> 4.0.10
In reply to Alexander Kanavin---
meta/recipes-devtools/python/python-gitdb.inc | 2 +-
.../python/{python3-gitdb_4.0.9.bb => python3-gitdb_4.0.10.bb} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-gitdb_4.0.9.bb => python3-gitdb_4.0.10.bb} (100%)meta/recipes-devtools/python/python-gitdb.inc +1 -1
@@ -8,7 +8,7 @@ inherit pypi PYPI_PACKAGE = "gitdb" -SRC_URI[sha256sum] = "bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa" +SRC_URI[sha256sum] = "6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a" DEPENDS = "${PYTHON_PN}-async ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-smmap"
meta/recipes-devtools/python/python3-gitdb_4.0.10.bb renamed from meta/recipes-devtools/python/python3-gitdb_4.0.9.bb +0 -0
Signature · 1 line
2.30.2
PATCH 48/77 diffoscope: upgrade 224 -> 230
In reply to Alexander Kanavin---
.../diffoscope/{diffoscope_224.bb => diffoscope_230.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/diffoscope/{diffoscope_224.bb => diffoscope_230.bb} (92%)meta/recipes-support/diffoscope/diffoscope_230.bb renamed from meta/recipes-support/diffoscope/diffoscope_224.bb +1 -1
@@ -12,7 +12,7 @@ PYPI_PACKAGE = "diffoscope" inherit pypi setuptools3 -SRC_URI[sha256sum] = "1920ebdca40e85f019a84e0220e4a79f00ffdafc0f78e1f1e2219123d5c08dfb" +SRC_URI[sha256sum] = "a35908c15bb006058f74c2d4f2be3b1ac7cf62c872cfbd2950114a8a705d8108" RDEPENDS:${PN} += "binutils vim squashfs-tools python3-libarchive-c python3-magic python3-rpm"
Signature · 1 line
2.30.2
PATCH 49/77 python3-mako: upgrade 1.2.3 -> 1.2.4
In reply to Alexander Kanavin---
.../python/{python3-mako_1.2.3.bb => python3-mako_1.2.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-mako_1.2.3.bb => python3-mako_1.2.4.bb} (85%)meta/recipes-devtools/python/python3-mako_1.2.4.bb renamed from meta/recipes-devtools/python/python3-mako_1.2.3.bb +1 -1
@@ -8,7 +8,7 @@ PYPI_PACKAGE = "Mako" inherit pypi python_setuptools_build_meta -SRC_URI[sha256sum] = "7fde96466fcfeedb0eed94f187f20b23d85e4cb41444be0e542e2c8c65c396cd" +SRC_URI[sha256sum] = "d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34" RDEPENDS:${PN} = "${PYTHON_PN}-html \ ${PYTHON_PN}-markupsafe \
Signature · 1 line
2.30.2
PATCH 50/77 python3-sphinx: upgrade 5.3.0 -> 6.0.0
In reply to Alexander KanavinLicense-Update: jquery/underscore are no longer bundled
---
.../{python3-sphinx_5.3.0.bb => python3-sphinx_6.0.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-sphinx_5.3.0.bb => python3-sphinx_6.0.0.bb} (84%)meta/recipes-devtools/python/python3-sphinx_6.0.0.bb renamed from meta/recipes-devtools/python/python3-sphinx_5.3.0.bb +2 -2
@@ -2,11 +2,11 @@ DESCRIPTION = "Python documentation generator" HOMEPAGE = "http://sphinx-doc.org/" SECTION = "devel/python" LICENSE = "BSD-2-Clause & MIT & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=72c536e78c21c567311b193fe00cd253" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2214a89317448c7f792f5b75dd6726e4" PYPI_PACKAGE = "Sphinx" -SRC_URI[sha256sum] = "51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5" +SRC_URI[sha256sum] = "58c140ecd9aa0abbc8ff6da48a266648eac9e5bfc8e49576efd2979bf46f5961" inherit python_flit_core pypi
Signature · 1 line
2.30.2
PATCH 51/77 libsolv: upgrade 0.7.22 -> 0.7.23
In reply to Alexander Kanavin---
.../libsolv/{libsolv_0.7.22.bb => libsolv_0.7.23.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/libsolv/{libsolv_0.7.22.bb => libsolv_0.7.23.bb} (95%)meta/recipes-extended/libsolv/libsolv_0.7.23.bb renamed from meta/recipes-extended/libsolv/libsolv_0.7.22.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/openSUSE/libsolv.git;branch=master;protocol=https \ file://0001-utils-Conside-musl-when-wrapping-qsort_r.patch \ " -SRCREV = "ea114b257b78bda6ee3e4238118ed93bc57c5984" +SRCREV = "6deaca7cf61ec2b32c4a3b494a751c8d15efbe8b" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.30.2
PATCH 52/77 gtk4: upgrade 4.8.2 -> 4.8.3
In reply to Alexander Kanavin---
meta/recipes-gnome/gtk+/{gtk4_4.8.2.bb => gtk4_4.8.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-gnome/gtk+/{gtk4_4.8.2.bb => gtk4_4.8.3.bb} (98%)meta/recipes-gnome/gtk+/gtk4_4.8.3.bb renamed from meta/recipes-gnome/gtk+/gtk4_4.8.2.bb +1 -1
@@ -37,7 +37,7 @@ MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" UPSTREAM_CHECK_REGEX = "gtk-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)\.tar.xz" SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk/${MAJ_VER}/gtk-${PV}.tar.xz" -SRC_URI[sha256sum] = "85b7a160b6e02eafa4e7d38f046f8720fab537d3fe73c01c864333a983a692a9" +SRC_URI[sha256sum] = "b362f968d085b4d3d9340d4d38c706377ded9d5374e694a2b6b7e6292e3cba74" S = "${WORKDIR}/gtk-${PV}"
Signature · 1 line
2.30.2
PATCH 53/77 librepo: upgrade 1.14.5 -> 1.15.1
In reply to Alexander Kanavin---
.../librepo/{librepo_1.14.5.bb => librepo_1.15.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/librepo/{librepo_1.14.5.bb => librepo_1.15.1.bb} (94%)meta/recipes-devtools/librepo/librepo_1.15.1.bb renamed from meta/recipes-devtools/librepo/librepo_1.14.5.bb +1 -1
@@ -10,7 +10,7 @@ SRC_URI = "git://github.com/rpm-software-management/librepo.git;branch=master;pr file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ " -SRCREV = "f4b915be5e04e88263097f65addfcac5919fef41" +SRCREV = "5f4de4a4e85845d4184fbd30c03ff8a8ec7df4af" S = "${WORKDIR}/git"
Signature · 1 line
2.30.2
PATCH 54/77 ruby: upgrade 3.1.3 -> 3.2.0
In reply to Alexander Kanavin---
...2-Obey-LDFLAGS-for-the-link-of-libruby.patch | 8 ++++----
.../ruby/0006-Make-gemspecs-reproducible.patch | 17 +++++++----------
.../ruby/{ruby_3.1.3.bb => ruby_3.2.0.bb} | 2 +-
3 files changed, 12 insertions(+), 15 deletions(-)
rename meta/recipes-devtools/ruby/{ruby_3.1.3.bb => ruby_3.2.0.bb} (98%)meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch +4 -4
@@ -1,4 +1,4 @@ -From 07fd1ada322eda6c05ac45c08fc814976f31b596 Mon Sep 17 00:00:00 2001 +From 21d8e7700fa0a9c4bf569dd366134060ae858832 Mon Sep 17 00:00:00 2001 From: Christopher Larson <[email protected]> Date: Thu, 5 May 2016 10:59:07 -0700 Subject: [PATCH] Obey LDFLAGS for the link of libruby
@@ -11,10 +11,10 @@ Upstream-Status: Pending 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/Makefile.in b/template/Makefile.in -index f5a3149..5cc75ae 100644 +index 1456313..15b98a4 100644 --- a/template/Makefile.in +++ b/template/Makefile.in -@@ -114,7 +114,7 @@ ENABLE_SHARED = @ENABLE_SHARED@ +@@ -127,7 +127,7 @@ ENABLE_SHARED = @ENABLE_SHARED@ LDSHARED = @LIBRUBY_LDSHARED@ DLDSHARED = @DLDSHARED@ XDLDFLAGS = @DLDFLAGS@
@@ -22,4 +22,4 @@ index f5a3149..5cc75ae 100644 +DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) SOLIBS = @SOLIBS@ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@ - MAINLIBS = @MAINLIBS@ + MAINLIBS = $(YJIT_LIBS) @MAINLIBS@
meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch +7 -10
@@ -1,4 +1,4 @@ -From 6e1dc610724a7aa8368cbcddf4bbe21cccc0f731 Mon Sep 17 00:00:00 2001 +From 3f60710bc29c1b08e128314d40101e87b7d2c9a1 Mon Sep 17 00:00:00 2001 From: Lucas Kanashiro <[email protected]> Date: Fri, 1 Nov 2019 15:25:17 -0300 Subject: [PATCH] Make gemspecs reproducible
@@ -17,19 +17,19 @@ Upstream-Status: Backport [debian] 5 files changed, 5 insertions(+) diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec -index fd49c1b..5b8bb00 100644 +index d215757..5148d56 100644 --- a/ext/bigdecimal/bigdecimal.gemspec +++ b/ext/bigdecimal/bigdecimal.gemspec @@ -4,6 +4,7 @@ Gem::Specification.new do |s| s.name = "bigdecimal" - s.version = "3.1.1" + s.version = "3.1.3" s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"] + s.date = RUBY_RELEASE_DATE s.email = ["[email protected]"] s.summary = "Arbitrary-precision decimal floating-point number library." diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec -index a9c0ec4..89da078 100644 +index 8781093..efdca32 100644 --- a/ext/fiddle/fiddle.gemspec +++ b/ext/fiddle/fiddle.gemspec @@ -8,6 +8,7 @@ end
@@ -41,10 +41,10 @@ index a9c0ec4..89da078 100644 spec.email = ["[email protected]", "[email protected]"] diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec -index aa57f8a..ba7f8e5 100644 +index d26a757..cc88c55 100644 --- a/ext/io/console/io-console.gemspec +++ b/ext/io/console/io-console.gemspec -@@ -4,6 +4,7 @@ _VERSION = "0.5.11" +@@ -4,6 +4,7 @@ _VERSION = "0.6.0" Gem::Specification.new do |s| s.name = "io-console" s.version = _VERSION
@@ -65,7 +65,7 @@ index 1f4798e..48743cf 100644 spec.email = ["[email protected]", "[email protected]"] diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec -index 525a15f..f6d0e22 100644 +index 3c96f7d..fec0872 100644 --- a/lib/rdoc/rdoc.gemspec +++ b/lib/rdoc/rdoc.gemspec @@ -7,6 +7,7 @@ end
@@ -76,6 +76,3 @@ index 525a15f..f6d0e22 100644 s.version = RDoc::VERSION s.authors = [ --- -2.25.1 -
meta/recipes-devtools/ruby/ruby_3.2.0.bb renamed from meta/recipes-devtools/ruby/ruby_3.1.3.bb +1 -1
@@ -50,7 +50,7 @@ do_configure:prepend() { DEPENDS:append:libc-musl = " libucontext" -SRC_URI[sha256sum] = "5ea498a35f4cd15875200a52dde42b6eb179e1264e17d78732c3a57cd1c6ab9e" +SRC_URI[sha256sum] = "daaa78e1360b2783f98deeceb677ad900f3a36c0ffa6e2b6b19090be77abc272" PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
Signature · 1 line
2.30.2
PATCH 55/77 python3-lxml: upgrade 4.9.1 -> 4.9.2
In reply to Alexander Kanavin---
.../python/{python3-lxml_4.9.1.bb => python3-lxml_4.9.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-lxml_4.9.1.bb => python3-lxml_4.9.2.bb} (95%)meta/recipes-devtools/python/python3-lxml_4.9.2.bb renamed from meta/recipes-devtools/python/python3-lxml_4.9.1.bb +1 -1
@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSES.txt;md5=e4c045ebad958ead4b48008f70838403 \ DEPENDS += "libxml2 libxslt" -SRC_URI[sha256sum] = "fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f" +SRC_URI[sha256sum] = "2455cfaeb7ac70338b3257f41e21f0724f4b5b0c0e7702da67ee6c3640835b67" SRC_URI += "${PYPI_SRC_URI}" inherit pkgconfig pypi setuptools3
Signature · 1 line
2.30.2
PATCH 56/77 python3-git: upgrade 3.1.29 -> 3.1.30
In reply to Alexander Kanavin---
.../python/{python3-git_3.1.29.bb => python3-git_3.1.30.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-git_3.1.29.bb => python3-git_3.1.30.bb} (92%)meta/recipes-devtools/python/python3-git_3.1.30.bb renamed from meta/recipes-devtools/python/python3-git_3.1.29.bb +1 -1
@@ -12,7 +12,7 @@ PYPI_PACKAGE = "GitPython" inherit pypi python_setuptools_build_meta -SRC_URI[sha256sum] = "cc36bfc4a3f913e66805a28e84703e419d9c264c1077e537b54f0e1af85dbefd" +SRC_URI[sha256sum] = "769c2d83e13f5d938b7688479da374c4e3d49f71549aaf462b646db9602ea6f8" DEPENDS += " ${PYTHON_PN}-gitdb"
Signature · 1 line
2.30.2
PATCH 57/77 curl: upgrade 7.86.0 -> 7.87.0
In reply to Alexander Kanavin---
meta/recipes-support/curl/{curl_7.86.0.bb => curl_7.87.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/curl/{curl_7.86.0.bb => curl_7.87.0.bb} (98%)meta/recipes-support/curl/curl_7.87.0.bb renamed from meta/recipes-support/curl/curl_7.86.0.bb +1 -1
@@ -14,7 +14,7 @@ SRC_URI = " \ file://run-ptest \ file://disable-tests \ " -SRC_URI[sha256sum] = "2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b" +SRC_URI[sha256sum] = "ee5f1a1955b0ed413435ef79db28b834ea5f0fb7c8cfb1ce47175cc3bee08fff" # Curl has used many names over the years... CVE_PRODUCT = "haxx:curl haxx:libcurl curl:curl curl:libcurl libcurl:libcurl daniel_stenberg:curl"
Signature · 1 line
2.30.2
PATCH 58/77 kmscube: upgrade to latest revision
In reply to Alexander Kanavin--- meta/recipes-graphics/kmscube/kmscube_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/kmscube/kmscube_git.bb +1 -1
@@ -10,7 +10,7 @@ DEPENDS = "virtual/libgles3 virtual/libgles2 virtual/egl libdrm" LIC_FILES_CHKSUM = "file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb" -SRCREV = "3bf6ee1a02334386d87cfe356c3bfb0b24e1fed8" +SRCREV = "345111481d654b38a72b5c3629151dc74f7a82bc" SRC_URI = "git://gitlab.freedesktop.org/mesa/kmscube;branch=master;protocol=https" UPSTREAM_CHECK_COMMITS = "1"
Signature · 1 line
2.30.2
PATCH 59/77 python3-hatch-vcs: upgrade 0.2.0 -> 0.3.0
In reply to Alexander Kanavin---
.../{python3-hatch-vcs_0.2.0.bb => python3-hatch-vcs_0.3.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-hatch-vcs_0.2.0.bb => python3-hatch-vcs_0.3.0.bb} (80%)meta/recipes-devtools/python/python3-hatch-vcs_0.3.0.bb renamed from meta/recipes-devtools/python/python3-hatch-vcs_0.2.0.bb +1 -1
@@ -7,7 +7,7 @@ inherit pypi python_hatchling PYPI_PACKAGE = "hatch_vcs" -SRC_URI[sha256sum] = "9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff" +SRC_URI[sha256sum] = "cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee" BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.2
PATCH 60/77 gobject-introspection: upgrade 1.72.0 -> 1.74.0
In reply to Alexander Kanavin---
...-Relocate-the-repository-directory-for-native-builds.patch | 4 ++--
...ntrospection_1.72.0.bb => gobject-introspection_1.74.0.bb} | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
rename meta/recipes-gnome/gobject-introspection/{gobject-introspection_1.72.0.bb => gobject-introspection_1.74.0.bb} (99%)meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Relocate-the-repository-directory-for-native-builds.patch +2 -2
@@ -1,4 +1,4 @@ -From 74a0fee892235c722ac60ddea6ee79bc3d7a93f5 Mon Sep 17 00:00:00 2001 +From d396e5126461631e2c73ce98ba034f1e44598f6a Mon Sep 17 00:00:00 2001 From: Sascha Silbe <[email protected]> Date: Fri, 8 Jun 2018 13:55:10 +0200 Subject: [PATCH] Relocate the repository directory for native builds
@@ -21,7 +21,7 @@ Signed-off-by: Sascha Silbe <[email protected]> 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/girepository/girepository.c b/girepository/girepository.c -index 7d03485..20f4813 100644 +index a0754f4..2d456f9 100644 --- a/girepository/girepository.c +++ b/girepository/girepository.c @@ -21,6 +21,8 @@
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.74.0.bb renamed from meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb +1 -1
@@ -17,7 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-$ file://0001-g-ir-tool-template.in-fix-girdir-path.patch \ " -SRC_URI[sha256sum] = "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc" +SRC_URI[sha256sum] = "347b3a719e68ba4c69ff2d57ee2689233ea8c07fc492205e573386779e42d653" SRC_URI:append:class-native = " file://0001-Relocate-the-repository-directory-for-native-builds.patch"
Signature · 1 line
2.30.2
PATCH 61/77 python3-dtschema: upgrade 2022.11 -> 2022.12
In reply to Alexander Kanavin---
...{python3-dtschema_2022.11.bb => python3-dtschema_2022.12.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-dtschema_2022.11.bb => python3-dtschema_2022.12.bb} (83%)meta/recipes-devtools/python/python3-dtschema_2022.12.bb renamed from meta/recipes-devtools/python/python3-dtschema_2022.11.bb +1 -1
@@ -7,7 +7,7 @@ inherit pypi setuptools3 PYPI_PACKAGE = "dtschema" -SRC_URI[sha256sum] = "825e51b8bb82a2d4833d15c25ff2b9a3f5a53b36a490d7c4b6b136037e823320" +SRC_URI[sha256sum] = "f532d433a915e507d4b426b7ef57a6730d23c0938b682fb4866f9dfa80a58ec6" DEPENDS += "python3-setuptools-scm-native" RDEPENDS:${PN} += "python3-ruamel-yaml python3-jsonschema python3-rfc3987"
Signature · 1 line
2.30.2
PATCH 62/77 bash: upgrade 5.2.9 -> 5.2.15
In reply to Alexander Kanavin---
meta/recipes-extended/bash/{bash_5.2.9.bb => bash_5.2.15.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/bash/{bash_5.2.9.bb => bash_5.2.15.bb} (89%)meta/recipes-extended/bash/bash_5.2.15.bb renamed from meta/recipes-extended/bash/bash_5.2.9.bb +1 -1
@@ -14,7 +14,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BP}.tar.gz;name=tarball \ file://use_aclocal.patch \ " -SRC_URI[tarball.sha256sum] = "68d978264253bc933d692f1de195e2e5b463a3984dfb4e5504b076865f16b6dd" +SRC_URI[tarball.sha256sum] = "13720965b5f4fc3a0d4b61dd37e7565c741da9a5be24edc2ae00182fc1b3588c" DEBUG_OPTIMIZATION:append:armv4 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" DEBUG_OPTIMIZATION:append:armv5 = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}"
Signature · 1 line
2.30.2
PATCH 63/77 kexec-tools: upgrade 2.0.25 -> 2.0.26
In reply to Alexander Kanavin---
.../kexec/{kexec-tools_2.0.25.bb => kexec-tools_2.0.26.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-kernel/kexec/{kexec-tools_2.0.25.bb => kexec-tools_2.0.26.bb} (97%)meta/recipes-kernel/kexec/kexec-tools_2.0.26.bb renamed from meta/recipes-kernel/kexec/kexec-tools_2.0.25.bb +1 -1
@@ -20,7 +20,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ " -SRC_URI[sha256sum] = "4eea6f8641ea3e349653a52c7fd33be1132322a5f3dc9f1a6ade886019767320" +SRC_URI[sha256sum] = "89bdd941542c64fec16311858df304ed3a3908c1a60874d69df5d9bf1611e062" inherit autotools update-rc.d systemd
Signature · 1 line
2.30.2
PATCH 64/77 python3-jsonschema: upgrade 4.17.0 -> 4.17.3
In reply to Alexander Kanavin---
...ython3-jsonschema_4.17.0.bb => python3-jsonschema_4.17.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-jsonschema_4.17.0.bb => python3-jsonschema_4.17.3.bb} (93%)meta/recipes-devtools/python/python3-jsonschema_4.17.3.bb renamed from meta/recipes-devtools/python/python3-jsonschema_4.17.0.bb +1 -1
@@ -4,7 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \ file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af" -SRC_URI[sha256sum] = "5bfcf2bca16a087ade17e02b282d34af7ccd749ef76241e7f9bd7c0cb8a9424d" +SRC_URI[sha256sum] = "0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d" inherit pypi python_hatchling
Signature · 1 line
2.30.2
PATCH 65/77 python3-pycairo: upgrade 1.21.0 -> 1.23.0
In reply to Alexander Kanavin---
.../{python3-pycairo_1.21.0.bb => python3-pycairo_1.23.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-pycairo_1.21.0.bb => python3-pycairo_1.23.0.bb} (90%)meta/recipes-devtools/python/python3-pycairo_1.23.0.bb renamed from meta/recipes-devtools/python/python3-pycairo_1.21.0.bb +1 -1
@@ -13,7 +13,7 @@ DEPENDS = "cairo python3" SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/pycairo-${PV}.tar.gz" GITHUB_BASE_URI = "https://github.com/pygobject/pycairo/releases/" -SRC_URI[sha256sum] = "251907f18a552df938aa3386657ff4b5a4937dde70e11aa042bc297957f4b74b" +SRC_URI[sha256sum] = "9b61ac818723adc04367301317eb2e814a83522f07bbd1f409af0dada463c44c" S = "${WORKDIR}/pycairo-${PV}"
Signature · 1 line
2.30.2
PATCH 66/77 nghttp2: upgrade 1.50.0 -> 1.51.0
In reply to Alexander Kanavin---
.../nghttp2/{nghttp2_1.50.0.bb => nghttp2_1.51.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/nghttp2/{nghttp2_1.50.0.bb => nghttp2_1.51.0.bb} (92%)meta/recipes-support/nghttp2/nghttp2_1.51.0.bb renamed from meta/recipes-support/nghttp2/nghttp2_1.50.0.bb +1 -1
@@ -8,7 +8,7 @@ SRC_URI = "\ ${GITHUB_BASE_URI}/download/v${PV}/nghttp2-${PV}.tar.xz \ file://0001-fetch-ocsp-response-use-python3.patch \ " -SRC_URI[sha256sum] = "af24007e34c18c782393a1dc3685f8fd5b50283e90a9191d25488eb50aa2c825" +SRC_URI[sha256sum] = "66aa76d97c143f42295405a31413e5e7d157968dad9f957bb4b015b598882e6b" inherit cmake manpages python3native github-releases PACKAGECONFIG[manpages] = ""
Signature · 1 line
2.30.2
PATCH 67/77 python3-certifi: upgrade 2022.9.24 -> 2022.12.7
In reply to Alexander Kanavin---
...ython3-certifi_2022.9.24.bb => python3-certifi_2022.12.7.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-certifi_2022.9.24.bb => python3-certifi_2022.12.7.bb} (86%)meta/recipes-devtools/python/python3-certifi_2022.12.7.bb renamed from meta/recipes-devtools/python/python3-certifi_2022.9.24.bb +1 -1
@@ -7,7 +7,7 @@ HOMEPAGE = " http://certifi.io/" LICENSE = "ISC" LIC_FILES_CHKSUM = "file://LICENSE;md5=3c2b7404369c587c3559afb604fce2f2" -SRC_URI[sha256sum] = "0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14" +SRC_URI[sha256sum] = "35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3" inherit pypi setuptools3
Signature · 1 line
2.30.2
PATCH 68/77 btrfs-tools: upgrade 6.0.2 -> 6.1
In reply to Alexander Kanavin---
.../btrfs-tools/{btrfs-tools_6.0.2.bb => btrfs-tools_6.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_6.0.2.bb => btrfs-tools_6.1.bb} (98%)meta/recipes-devtools/btrfs-tools/btrfs-tools_6.1.bb renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_6.0.2.bb +1 -1
@@ -19,7 +19,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;b file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ file://0001-Use-pread-pwrite-ftruncate-stat-instead-of-64bit-equ.patch \ " -SRCREV = "ff964ba6aef98bd1bafe8ff9b0088501b30bdd27" +SRCREV = "cde5faa6787e6fa720c99d2f10caa187a493c13f" S = "${WORKDIR}/git" PACKAGECONFIG ??= " \
Signature · 1 line
2.30.2
PATCH 69/77 python3-hypothesis: upgrade 6.57.1 -> 6.61.0
In reply to Alexander Kanavin---
...ython3-hypothesis_6.57.1.bb => python3-hypothesis_6.61.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-hypothesis_6.57.1.bb => python3-hypothesis_6.61.0.bb} (91%)meta/recipes-devtools/python/python3-hypothesis_6.61.0.bb renamed from meta/recipes-devtools/python/python3-hypothesis_6.57.1.bb +1 -1
@@ -13,7 +13,7 @@ SRC_URI += " \ file://test_rle.py \ " -SRC_URI[sha256sum] = "1d8ed5136f368e343f39172b06f68aa7fd1312cf643c332ab18a75d56789fa90" +SRC_URI[sha256sum] = "fbf7da30aea839d88898f74bcc027f0f997060498a8a7605880688c8a2166215" RDEPENDS:${PN} += " \ python3-attrs \
Signature · 1 line
2.30.2
PATCH 70/77 libsndfile1: upgrade 1.1.0 -> 1.2.0
In reply to Alexander Kanavin---
.../libsndfile/{libsndfile1_1.1.0.bb => libsndfile1_1.2.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-multimedia/libsndfile/{libsndfile1_1.1.0.bb => libsndfile1_1.2.0.bb} (92%)meta/recipes-multimedia/libsndfile/libsndfile1_1.2.0.bb renamed from meta/recipes-multimedia/libsndfile/libsndfile1_1.1.0.bb +1 -1
@@ -13,7 +13,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ " GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" -SRC_URI[sha256sum] = "0f98e101c0f7c850a71225fb5feaf33b106227b3d331333ddc9bacee190bcf41" +SRC_URI[sha256sum] = "0e30e7072f83dc84863e2e55f299175c7e04a5902ae79cfb99d4249ee8f6d60a" LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
Signature · 1 line
2.30.2
PATCH 71/77 repo: upgrade 2.29.9 -> 2.31
In reply to Alexander Kanavin---
meta/recipes-devtools/repo/{repo_2.29.9.bb => repo_2.31.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/repo/{repo_2.29.9.bb => repo_2.31.bb} (95%)meta/recipes-devtools/repo/repo_2.31.bb renamed from meta/recipes-devtools/repo/repo_2.29.9.bb +1 -1
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = "git://gerrit.googlesource.com/git-repo.git;protocol=https;branch=main \ file://0001-python3-shebang.patch \ " -SRCREV = "47020ba249c39783a66c0031fd9200caecfbbdc8" +SRCREV = "a621254b263664efa308a645214d3d140e068676" MIRRORS += "git://gerrit.googlesource.com/git-repo.git git://github.com/GerritCodeReview/git-repo.git"
Signature · 1 line
2.30.2
PATCH 72/77 libpcap: upgrade 1.10.1 -> 1.10.2
In reply to Alexander Kanavin---
.../libpcap/{libpcap_1.10.1.bb => libpcap_1.10.2.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-connectivity/libpcap/{libpcap_1.10.1.bb => libpcap_1.10.2.bb} (95%)meta/recipes-connectivity/libpcap/libpcap_1.10.2.bb renamed from meta/recipes-connectivity/libpcap/libpcap_1.10.1.bb +1 -1
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \ DEPENDS = "flex-native bison-native" SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz" -SRC_URI[sha256sum] = "ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4" +SRC_URI[sha256sum] = "db6d79d4ad03b8b15fb16c42447d093ad3520c0ec0ae3d331104dcfb1ce77560" inherit autotools binconfig-disabled pkgconfig
Signature · 1 line
2.30.2
PATCH 73/77 python3-jsonschema: depend on rfc3339-validator in all cases
In reply to Alexander KanavinThis has been the case since
https://github.com/python-jsonschema/jsonschema/commit/622c7b276e01d24b5569ab27cfefb692ae91012e
--- meta/recipes-devtools/python/python3-jsonschema_4.17.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3-jsonschema_4.17.3.bb +1 -1
@@ -19,7 +19,7 @@ PACKAGECONFIG[format] = ",,,\ ${PYTHON_PN}-jsonpointer \ ${PYTHON_PN}-webcolors \ ${PYTHON_PN}-rfc3987 \ - ${PYTHON_PN}-strict-rfc3339 \ + ${PYTHON_PN}-rfc3339-validator \ " PACKAGECONFIG[nongpl] = ",,,\ ${PYTHON_PN}-idna \
Signature · 1 line
2.30.2
PATCH 74/77 python3-strict-rfc3339: remove the recipe
In reply to Alexander KanavinIt is both unmaintained and not needed by anything in core or meta-oe.
--- meta/conf/distro/include/maintainers.inc | 1 - ...001-setup.py-use-vendored-_distutils.patch | 27 ------------------- .../python/python3-strict-rfc3339_0.7.bb | 11 -------- 3 files changed, 39 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3-strict-rfc3339/0001-setup.py-use-vendored-_distutils.patch delete mode 100644 meta/recipes-devtools/python/python3-strict-rfc3339_0.7.bb
meta/conf/distro/include/maintainers.inc +0 -1
@@ -691,7 +691,6 @@ RECIPE_MAINTAINER:pn-python3-sphinxcontrib-serializinghtml = "Tim Orling <tim.or RECIPE_MAINTAINER:pn-python3-sphinxcontrib-jsmath = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-sphinxcontrib-applehelp = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-sphinx-rtd-theme = "Tim Orling <[email protected]>" -RECIPE_MAINTAINER:pn-python3-strict-rfc3339 = "Bruce Ashfield <[email protected]>" RECIPE_MAINTAINER:pn-python3-subunit = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER:pn-python3-testtools = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER:pn-python3-toml = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-strict-rfc3339/0001-setup.py-use-vendored-_distutils.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 857719e82daea0d85b734cac34cf569050724068 Mon Sep 17 00:00:00 2001 -From: Tim Orling <[email protected]> -Date: Sun, 20 Feb 2022 20:26:51 -0800 -Subject: [PATCH] setup.py: use vendored _distutils - -Deprecation warning of distutils is interferring with bdist_wheel build. - -For now, use the vendored setuptools._distutils.core. - -Upstream-Status: Pending [upstream appears unmaintained] - -Signed-off-by: Tim Orling <[email protected]> ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 1bf87cf..a49fb8e 100644 ---- a/setup.py -+++ b/setup.py -@@ -1,5 +1,5 @@ - import os.path --from distutils.core import setup -+from setuptools._distutils.core import setup - - readme_file = os.path.join(os.path.dirname(__file__), 'README.md') - readme = open(readme_file).read()
meta/recipes-devtools/python/python3-strict-rfc3339_0.7.bb deleted +0 -11
@@ -1,11 +0,0 @@ -SUMMARY = "Strict, simple, lightweight RFC3339 function.s" -HOMEPAGE = "https://pypi.org/project/strict-rfc3339/" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8f0e2cd40e05189ec81232da84bd6e1a" - -SRC_URI += "file://0001-setup.py-use-vendored-_distutils.patch" -SRC_URI[sha256sum] = "5cad17bedfc3af57b399db0fed32771f18fc54bbd917e85546088607ac5e1277" - -inherit pypi setuptools3 - -BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.30.2
PATCH 75/77 elfutils: do not error out on deprecated declarations
In reply to Alexander KanavinThis addresses new curl's deprecation warnings treated as failures.
--- meta/recipes-devtools/elfutils/elfutils_0.188.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/elfutils/elfutils_0.188.bb +2 -0
@@ -33,6 +33,8 @@ inherit autotools gettext ptest pkgconfig EXTRA_OECONF = "--program-prefix=eu-" BUILD_CFLAGS += "-Wno-error=stringop-overflow" +# compatibility with curl 7.87; can be removed when elfutils upstream fixes the deprecation fails +BUILD_CFLAGS += "-Wno-error=deprecated-declarations" DEPENDS_BZIP2 = "bzip2-replacement-native" DEPENDS_BZIP2:class-target = "bzip2"
Signature · 1 line
2.30.2
PATCH 76/77 gcr3: limit version check to 3.x versions without odd-even rule
In reply to Alexander Kanavin--- meta/recipes-gnome/gcr/gcr3_3.40.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gcr/gcr3_3.40.0.bb +1 -1
@@ -18,7 +18,7 @@ CFLAGS += "-D_GNU_SOURCE" GNOMEBASEBUILDCLASS = "meson" GTKDOC_MESON_OPTION = "gtk_doc" inherit gnomebase gtk-icon-cache gtk-doc features_check upstream-version-is-even vala gobject-introspection gettext mime mime-xdg -UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>\d+\.(?!9\d+)(\d*[02468])+(\.\d+)+)\.tar" +UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3.(?!9\d+)\d+(\.\d+)+)\.tar" SRC_URI = " \ https://download.gnome.org/sources/gcr/3.40/gcr-${PV}.tar.xz;name=archive \
Signature · 1 line
2.30.2
PATCH 77/77 ncruses: restore version check as it's now again working due to release of 6.4
In reply to Alexander Kanavin--- meta/recipes-core/ncurses/ncurses_6.3+20220423.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-core/ncurses/ncurses_6.3+20220423.bb +0 -1
@@ -10,7 +10,6 @@ SRCREV = "20db1fb41ec91cd8a1f528e770362092c5403378" S = "${WORKDIR}/git" EXTRA_OECONF += "--with-abi-version=5" UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)$" -UPSTREAM_VERSION_UNKNOWN = "1" # This is needed when using patchlevel versions like 6.1+20181013 CVE_VERSION = "${@d.getVar("PV").split('+')[0]}.${@d.getVar("PV").split('+')[1]}"
Signature · 1 line
2.30.2