Update to git ded4637

This commit is contained in:
Sandro Mani 2022-05-21 17:38:20 +02:00
parent 9d6b0726a6
commit 0d692032bc
10 changed files with 24 additions and 113 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/libLAS-1.8.0.tar.bz2
/libLAS-1.8.1.tar.bz2
/libLAS-d76a061.tar.gz
/libLAS-ded4637.tar.gz

View File

@ -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 <manisandro@gmail.com> - 1.8.2-0.1.gitded4637
- Update to git ded4637
* Fri May 20 2022 Sandro Mani <manisandro@gmail.com> - 1.8.1-21.gitd76a061
- Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0

View File

@ -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<short *>( &(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);
+ }
}
}

View File

@ -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]));

View File

@ -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<short *>( &(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<short *>( &(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() &&

View File

@ -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 (...)

View File

@ -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 ) ),

View File

@ -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",

View File

@ -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)

View File

@ -1 +1 @@
SHA512 (libLAS-d76a061.tar.gz) = 2cd6dff82f6e2ea60c604eb20a1403f4e8f377fd9074394b8877e88283c059471ffaf9c8e57534fc56821c4c68b2aed11e616a5966be58e2f8053b868c235a1f
SHA512 (libLAS-ded4637.tar.gz) = 308a4d25a8ef5ad3f86fa9e0687da45a3236b53685e35b72532565fa23dedb579b7b9eef2c35833c648578fa54c1a4f9c6689a4b0ca790e9dab25925d13bdce1