From 0d692032bc5dde987a2608f34a5399889447867f Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sat, 21 May 2022 17:38:20 +0200 Subject: [PATCH] Update to git ded4637 --- .gitignore | 1 + liblas.spec | 28 ++++++---------------------- liblas_CVE-2018-20536.patch | 15 --------------- liblas_CVE-2018-20537.patch | 20 -------------------- liblas_CVE-2018-20539.patch | 24 ------------------------ liblas_CVE-2018-20540.patch | 15 --------------- liblas_boost173.patch | 20 ++++++++++---------- liblas_gdal3.patch | 6 +++--- liblas_pkgconfig.patch | 6 +++--- sources | 2 +- 10 files changed, 24 insertions(+), 113 deletions(-) delete mode 100644 liblas_CVE-2018-20536.patch delete mode 100644 liblas_CVE-2018-20537.patch delete mode 100644 liblas_CVE-2018-20539.patch delete mode 100644 liblas_CVE-2018-20540.patch diff --git a/.gitignore b/.gitignore index 1cb5534..838dd6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /libLAS-1.8.0.tar.bz2 /libLAS-1.8.1.tar.bz2 /libLAS-d76a061.tar.gz +/libLAS-ded4637.tar.gz diff --git a/liblas.spec b/liblas.spec index e06fa3d..db6f6d3 100644 --- a/liblas.spec +++ b/liblas.spec @@ -1,9 +1,9 @@ -%global commit d76a061f33a69a36ab116cd939c5d444b301efd8 +%global commit ded463732db1f9baf461be6f3fe5b8bb683c41cd %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: liblas -Version: 1.8.1 -Release: 21%{?shortcommit:.git%shortcommit}%{?dist} +Version: 1.8.2 +Release: 0.1%{?shortcommit:.git%shortcommit}%{?dist} Summary: Library for reading and writing the very common LAS LiDAR format License: BSD and Boost @@ -20,22 +20,6 @@ Source0: https://download.osgeo.org/%{name}/libLAS-%{version}.tar.bz2 # removal of OSRFixup() and OSRFixupOrdering(): no longer needed since objects constructed are always valid Patch1: liblas_gdal3.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1652609 -# https://github.com/libLAS/libLAS/issues/159 -Patch2: liblas_CVE-2018-20539.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1652611 -# https://github.com/libLAS/libLAS/issues/160 -Patch3: liblas_CVE-2018-20537.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1652610 -# https://github.com/libLAS/libLAS/issues/161 -Patch4: liblas_CVE-2018-20536.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1652612 -# https://github.com/libLAS/libLAS/issues/181 -Patch5: liblas_CVE-2018-20540.patch - # Fix incorrect libgeotiff pkgconfig require resulting in broken dependencies # Fix incorrect includedir and libdir paths Patch6: liblas_pkgconfig.patch @@ -100,9 +84,6 @@ libLAS utility applications. %cmake_install -%ldconfig_scriptlets - - %files %exclude %{_datadir}/%{name}/ %{_libdir}/*.so.3 @@ -121,6 +102,9 @@ libLAS utility applications. %changelog +* Sat May 21 2022 Sandro Mani - 1.8.2-0.1.gitded4637 +- Update to git ded4637 + * Fri May 20 2022 Sandro Mani - 1.8.1-21.gitd76a061 - Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 diff --git a/liblas_CVE-2018-20536.patch b/liblas_CVE-2018-20536.patch deleted file mode 100644 index 1da7943..0000000 --- a/liblas_CVE-2018-20536.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-06-08 11:37:26.871015429 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.873015404 +0200 -@@ -516,8 +516,9 @@ const GTIF* SpatialReference::GetGTIF() - // The '+ 1' accounts for the header itself. - int count = (header->numKeys + 1) * 4; - short *data_s = reinterpret_cast( &(data[0])); -- -- ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s); -+ if(std::size_t(count) <= data.size() / sizeof(short)) { -+ ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s); -+ } - } - } - diff --git a/liblas_CVE-2018-20537.patch b/liblas_CVE-2018-20537.patch deleted file mode 100644 index 56ffd1d..0000000 --- a/liblas_CVE-2018-20537.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-06-08 11:37:26.837015849 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.839015824 +0200 -@@ -522,14 +522,14 @@ const GTIF* SpatialReference::GetGTIF() - } - - if (uid == record.GetUserId(true).c_str() && -- 34736 == record.GetRecordId()) -+ 34736 == record.GetRecordId() && !data.empty()) - { - int count = data.size() / sizeof(double); - ST_SetKey(m_tiff, record.GetRecordId(), count, STT_DOUBLE, &(data[0])); - } - - if (uid == record.GetUserId(true).c_str() && -- 34737 == record.GetRecordId()) -+ 34737 == record.GetRecordId() && !data.empty()) - { - int count = data.size()/sizeof(uint8_t); - ST_SetKey(m_tiff, record.GetRecordId(), count, STT_ASCII, &(data[0])); diff --git a/liblas_CVE-2018-20539.patch b/liblas_CVE-2018-20539.patch deleted file mode 100644 index d8855c4..0000000 --- a/liblas_CVE-2018-20539.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/spatialreference.cpp 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/spatialreference.cpp 2020-06-08 11:37:26.804016256 +0200 -@@ -510,12 +510,15 @@ const GTIF* SpatialReference::GetGTIF() - #pragma pack(pop) - - ShortKeyHeader *header = (ShortKeyHeader *)data.data(); -- // Calculate the number of shorts in the VLR data. -- // The '+ 1' accounts for the header itself. -- int count = (header->numKeys + 1) * 4; -- short *data_s = reinterpret_cast( &(data[0])); -+ if (header) -+ { -+ // Calculate the number of shorts in the VLR data. -+ // The '+ 1' accounts for the header itself. -+ int count = (header->numKeys + 1) * 4; -+ short *data_s = reinterpret_cast( &(data[0])); - -- ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s); -+ ST_SetKey(m_tiff, record.GetRecordId(), count, STT_SHORT, data_s); -+ } - } - - if (uid == record.GetUserId(true).c_str() && diff --git a/liblas_CVE-2018-20540.patch b/liblas_CVE-2018-20540.patch deleted file mode 100644 index 5cbb9b0..0000000 --- a/liblas_CVE-2018-20540.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp 2020-06-08 11:37:26.906014997 +0200 -@@ -137,7 +137,10 @@ inline std::istream* Open(std::string co - { - ifs = new std::ifstream(); - ifs->open(filename.c_str(), mode); -- if (ifs->is_open() == false) return NULL; -+ if (ifs->is_open() == false) { -+ delete ifs; -+ return NULL; -+ } - return ifs; - } - catch (...) diff --git a/liblas_boost173.patch b/liblas_boost173.patch index 5da808e..e6aedf4 100644 --- a/liblas_boost173.patch +++ b/liblas_boost173.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/c_api.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/c_api.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/c_api.cpp 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/c_api.cpp 2020-06-08 11:37:26.973014170 +0200 -@@ -510,7 +510,7 @@ LAS_DLL LASErrorEnum LASReader_SetOutput +diff -rupN --no-dereference libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/c_api.cpp libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/c_api.cpp +--- libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/c_api.cpp 2022-03-24 12:29:23.000000000 +0100 ++++ libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/c_api.cpp 2022-05-21 00:48:53.569047862 +0200 +@@ -511,7 +511,7 @@ LAS_DLL LASErrorEnum LASReader_SetOutput transforms.erase( std::remove_if( transforms.begin(), transforms.end(), @@ -10,7 +10,7 @@ diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/ transforms.end()); liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h)); -@@ -1852,7 +1852,7 @@ LAS_DLL LASErrorEnum LASWriter_SetOutput +@@ -1853,7 +1853,7 @@ LAS_DLL LASErrorEnum LASWriter_SetOutput transforms.erase( std::remove_if( transforms.begin(), transforms.end(), @@ -19,11 +19,11 @@ diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/ transforms.end()); liblas::TransformPtr srs_transform = liblas::TransformPtr(new liblas::ReprojectionTransform(in_ref, *out_ref, &h)); -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/header.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/header.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/header.cpp 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/header.cpp 2020-06-08 11:37:26.973014170 +0200 -@@ -610,7 +610,7 @@ void Header::DeleteVLRs(std::string cons - +diff -rupN --no-dereference libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/header.cpp libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/header.cpp +--- libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/header.cpp 2022-03-24 12:29:23.000000000 +0100 ++++ libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/header.cpp 2022-05-21 00:48:53.569047862 +0200 +@@ -609,7 +609,7 @@ void Header::DeleteVLRs(std::string cons + { m_vlrs.erase( std::remove_if( m_vlrs.begin(), m_vlrs.end(), - boost::bind( &SameVLRs, name, id, _1 ) ), diff --git a/liblas_gdal3.patch b/liblas_gdal3.patch index 327cb66..aa2126a 100644 --- a/liblas_gdal3.patch +++ b/liblas_gdal3.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/gt_wkt_srs.cpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/gt_wkt_srs.cpp ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/src/gt_wkt_srs.cpp 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/src/gt_wkt_srs.cpp 2020-06-08 11:37:26.763016762 +0200 +diff -rupN --no-dereference libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/gt_wkt_srs.cpp libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/gt_wkt_srs.cpp +--- libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/src/gt_wkt_srs.cpp 2022-03-24 12:29:23.000000000 +0100 ++++ libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/src/gt_wkt_srs.cpp 2022-05-21 00:48:53.489050727 +0200 @@ -299,7 +299,6 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIF oSRS.SetFromUserInput(pszWKT); oSRS.SetExtension( "PROJCS", "PROJ4", diff --git a/liblas_pkgconfig.patch b/liblas_pkgconfig.patch index 5ee8601..e48831e 100644 --- a/liblas_pkgconfig.patch +++ b/liblas_pkgconfig.patch @@ -1,6 +1,6 @@ -diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/apps/CMakeLists.txt libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt ---- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/apps/CMakeLists.txt 2020-04-05 18:40:29.000000000 +0200 -+++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/apps/CMakeLists.txt 2020-06-08 11:37:26.939014590 +0200 +diff -rupN --no-dereference libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/apps/CMakeLists.txt libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/apps/CMakeLists.txt +--- libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd/apps/CMakeLists.txt 2022-03-24 12:29:23.000000000 +0100 ++++ libLAS-ded463732db1f9baf461be6f3fe5b8bb683c41cd-new/apps/CMakeLists.txt 2022-05-21 00:48:53.530049258 +0200 @@ -195,8 +195,8 @@ if(UNIX) if(WITH_PKGCONFIG) diff --git a/sources b/sources index 74407c1..8462077 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libLAS-d76a061.tar.gz) = 2cd6dff82f6e2ea60c604eb20a1403f4e8f377fd9074394b8877e88283c059471ffaf9c8e57534fc56821c4c68b2aed11e616a5966be58e2f8053b868c235a1f +SHA512 (libLAS-ded4637.tar.gz) = 308a4d25a8ef5ad3f86fa9e0687da45a3236b53685e35b72532565fa23dedb579b7b9eef2c35833c648578fa54c1a4f9c6689a4b0ca790e9dab25925d13bdce1