Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pfstools for openSUSE:Factory checked in at 2022-01-04 19:37:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pfstools (Old) and /work/SRC/openSUSE:Factory/.pfstools.new.1896 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pfstools" Tue Jan 4 19:37:30 2022 rev:4 rq:943551 version:2.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/pfstools/pfstools.changes 2021-11-20 02:40:25.568525554 +0100 +++ /work/SRC/openSUSE:Factory/.pfstools.new.1896/pfstools.changes 2022-01-04 19:37:36.889939891 +0100 @@ -1,0 +2,10 @@ +Mon Jan 3 03:51:37 UTC 2022 - Stefan Br??ns <[email protected]> + +- Fix compilation error due to detected OOB access, add + 0001-Avoid-out-of-bounds-access-for-monochrome-images-in-.patch +- Fix compilation with CMake >= 3.22, add + 0001-Replace-deprecated-removed-GLUT_glut_LIBRARY-with-GL.patch +- Reenable OpenEXR with OpenEXR >= 3.x detection fix, add + 0001-Prefer-upstream-CMake-Config-Mode-files-for-OpenEXR.patch + +------------------------------------------------------------------- New: ---- 0001-Avoid-out-of-bounds-access-for-monochrome-images-in-.patch 0001-Prefer-upstream-CMake-Config-Mode-files-for-OpenEXR.patch 0001-Replace-deprecated-removed-GLUT_glut_LIBRARY-with-GL.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pfstools.spec ++++++ --- /var/tmp/diff_new_pack.dDweHx/_old 2022-01-04 19:37:37.465940644 +0100 +++ /var/tmp/diff_new_pack.dDweHx/_new 2022-01-04 19:37:37.469940649 +0100 @@ -1,7 +1,7 @@ # # spec file for package pfstools # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,8 +15,8 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -# Only compatible with OpenEXR <= 2.5.x -%bcond_with openexr + +%bcond_without openexr %define _libname libpfs2 Name: pfstools @@ -31,11 +31,17 @@ Patch2: pfstools-octinstall.patch Patch3: pfstools-stdlib.patch Patch4: pfstools-1.8.1-fix-return-in-nonvoid.patch -# PATCH-FIX-OPENSUSE - https://sourceforge.net/p/pfstools/bugs/45/ +# PATCH-FIX-UPSTREAM - https://sourceforge.net/p/pfstools/bugs/45/ Patch5: pfstools-fix-libpfs-linkage.patch # patch derived from https://github.com/pld-linux/pfstools/commit/67bd2304e516545f2b203f975ac5dd30d2b479b3 # I guess it could go upstream as is; sent email to mantiuk at gmail Patch7: pfstools-ImageMagick7.patch +# PATCH-FIX-UPSTREAM - https://sourceforge.net/p/pfstools/bugs/52/ +Patch8: 0001-Avoid-out-of-bounds-access-for-monochrome-images-in-.patch +# PATCH-FIX-UPSTREAM - https://sourceforge.net/p/pfstools/bugs/53/ +Patch9: 0001-Replace-deprecated-removed-GLUT_glut_LIBRARY-with-GL.patch +# PATCH-FIX-UPSTREAM - https://sourceforge.net/p/pfstools/bugs/54/ +Patch10: 0001-Prefer-upstream-CMake-Config-Mode-files-for-OpenEXR.patch # previous versions of cmake don't support ImageMagick 7 BuildRequires: cmake >= 3.9.0 BuildRequires: doxygen @@ -48,7 +54,7 @@ BuildRequires: readline-devel BuildRequires: pkgconfig(Magick++) %if %{with openexr} -BuildRequires: pkgconfig(OpenEXR) < 3.0 +BuildRequires: pkgconfig(OpenEXR) %endif BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Widgets) ++++++ 0001-Avoid-out-of-bounds-access-for-monochrome-images-in-.patch ++++++ >From 98543dd4f71a302f9c05605ef7f4a7031b2f5da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Mon, 3 Jan 2022 04:48:55 +0100 Subject: [PATCH] Avoid out-of-bounds access for monochrome images in pfsview GCC rightfully complains when `lutPixFloor[257*2] is accessed, enlarge so the largest used index is size-1. Also fix check for value=+inf in clipping check. Fixes https://sourceforge.net/p/pfstools/bugs/52/ --- src/pfsview/pfsview_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pfsview/pfsview_widget.cpp b/src/pfsview/pfsview_widget.cpp index 0c8e98f..c7ba599 100644 --- a/src/pfsview/pfsview_widget.cpp +++ b/src/pfsview/pfsview_widget.cpp @@ -340,7 +340,7 @@ static void mapFrameToImage( pfs::Array2D *R, pfs::Array2D *G, pfs::Array2D *B, assert( !color || (color && B != NULL) ); - float lutPixFloor[257*2]; + float lutPixFloor[257*2+1]; QRgb lutPixel[257*2]; int lutSize; if( !color && ( negativeTreatment == NEGATIVE_GREEN_SCALE || @@ -491,7 +491,7 @@ static void mapFrameToImage( pfs::Array2D *R, pfs::Array2D *G, pfs::Array2D *B, // Single channel int p = binarySearchPixels( (*R)(index), lutPixFloor, lutSize ); pixel = lutPixel[p]; - if( infNaNTreatment == INFNAN_MARK_AS_RED && (p == 0 || p == LUTSIZE+1)) + if( infNaNTreatment == INFNAN_MARK_AS_RED && (p == 0 || p == lutSize - 1)) if( !std::isfinite( (*R)(index) ) ) { // x is NaN or Inf pixel = QColor( 255, 0, 0 ).rgb(); } -- 2.34.1 ++++++ 0001-Prefer-upstream-CMake-Config-Mode-files-for-OpenEXR.patch ++++++ >From 95c5e87b8fe19cc6d067e1c2ce6239a5ba413a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Mon, 3 Jan 2022 06:09:25 +0100 Subject: [PATCH] Prefer upstream CMake Config Mode files for OpenEXR The bundled FindOpenEXR.cmake Find Module is quite outdated, import the OpenEXR target from its upstream definition. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2923cf..a33293b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,7 +106,15 @@ OPTION(WITH_OpenEXR "Compile with OpenEXR library" ON) if( WITH_OpenEXR ) -find_package (OpenEXR) +find_package (OpenEXR NO_MODULE) +if( TARGET OpenEXR::OpenEXR ) + set( OPENEXR_FOUND TRUE ) + set( OPENEXR_LIBRARIES OpenEXR::OpenEXR ) + get_target_property( OPENEXR_INCLUDE_DIR OpenEXR::OpenEXR INTERFACE_INCLUDE_DIRECTORIES ) +else () + find_package (OpenEXR MODULE) +endif () + if( NOT OPENEXR_FOUND ) MESSAGE( STATUS "OpenEXR not found. The following command will not be compiled: pfsinexr pfsoutexr. " ) -- 2.34.1 ++++++ 0001-Replace-deprecated-removed-GLUT_glut_LIBRARY-with-GL.patch ++++++ >From ad570c8d82732ba1d85e1b23de679f04f2fb23d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]> Date: Mon, 3 Jan 2022 05:20:30 +0100 Subject: [PATCH] Replace deprecated/removed GLUT_glut_LIBRARY with GLUT::GLUT target GLUT_glut_LIBRARY has been removed with CMake 3.22, see https://gitlab.kitware.com/cmake/cmake/-/issues/23018 --- src/pfsglview/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pfsglview/CMakeLists.txt b/src/pfsglview/CMakeLists.txt index b4d74fb..aa632bd 100644 --- a/src/pfsglview/CMakeLists.txt +++ b/src/pfsglview/CMakeLists.txt @@ -11,8 +11,7 @@ endif() add_executable(pfsglview pfsglview.cpp picture_io.cpp module.cpp m_histogram.cpp m_status.cpp m_on_screen_display.cpp) -# TODO: Use ${GLUT_LIBRARY} instead. -target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} pfs) +target_link_libraries(pfsglview ${OPENGL_LIBRARIES} GLUT::GLUT pfs) install (TARGETS pfsglview DESTINATION bin) install (FILES pfsglview.1 DESTINATION ${MAN_DIR}) -- 2.34.1
