Compare commits

...

1 Commits
rawhide ... f37

Author SHA1 Message Date
Markus Neteler a63ac14dbe patch to guard against bad return numbers
from upstream #3966, to be removed with PDAL 2.5.1
2023-02-06 19:10:29 +01:00
2 changed files with 22 additions and 1 deletions

View File

@ -9,7 +9,7 @@ Summary: Point Data Abstraction Library
Name: PDAL
# NOTE: Re-verifiy test exclusions in %%check when updating
Version: 2.4.3
Release: 1%{?dist}
Release: 2%{?dist}
# The code is licensed BSD except for:
# - filters/private/csf/* and plugins/i3s/lepcc/* are ASL 2.0
# - vendor/arbiter/*, plugins/nitf/io/nitflib.h and plugins/oci/io/OciWrapper.* are Expat/MIT
@ -43,6 +43,10 @@ Patch1: PDAL_tests.patch
# fix build with sphinxcontrib-bibtex 2.0 (RHBZ #1921498)
Patch2: PDAL_sphinxconf.patch
# Guard against bad return numbers, https://github.com/PDAL/PDAL/pull/3966
# to be removed with PDAL 2.5.1
Patch3: PDAL_bad_return_numbers.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: eigen3-devel
@ -246,6 +250,9 @@ sphinx-build -b html . build/html
%license LICENSE.txt
%changelog
* Mon Feb 06 2023 Markus Neteler <neteler@mundialis.de> 2.4.3-2
- patch to guard against bad return numbers (from upstream #3966), to be removed with PDAL 2.5.1
* Sat Aug 06 2022 Sandro Mani <manisandro@gmail.com> - 2.4.3-1
- Update to 2.4.3

View File

@ -0,0 +1,14 @@
diff --git a/io/private/las/Summary.cpp b/io/private/las/Summary.cpp
index e9232d4806..91059bfaf9 100644
--- a/io/private/las/Summary.cpp
+++ b/io/private/las/Summary.cpp
@@ -57,7 +57,8 @@ void Summary::addPoint(double x, double y, double z, int returnNumber)
m_bounds.grow(x, y, z);
// Returns numbers are indexed from one, but the array indexes from 0.
- m_returnCounts[returnNumber - 1]++;
+ if (returnNumber >= 1 && returnNumber <= m_returnCounts.size())
+ m_returnCounts[returnNumber - 1]++;
}