[geos-commits] [SCM] GEOS branch 3.13 updated. 32325937373d4f6e14be5cb40bb841188f5c0475
git at osgeo.org
git at osgeo.org
Fri Oct 3 13:13:36 PDT 2025
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, 3.13 has been updated
via 32325937373d4f6e14be5cb40bb841188f5c0475 (commit)
from 2eda0a8fc2de92e1545f7e62fe7649aa8a83981e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 32325937373d4f6e14be5cb40bb841188f5c0475
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Oct 3 10:06:16 2025 -0700
Remove undefined behaviour in CoordinateSequence::closeRing. Closes #1309
diff --git a/src/geom/CoordinateSequence.cpp b/src/geom/CoordinateSequence.cpp
index 599ca6ffb..0345fe2d4 100644
--- a/src/geom/CoordinateSequence.cpp
+++ b/src/geom/CoordinateSequence.cpp
@@ -256,9 +256,10 @@ void
CoordinateSequence::closeRing(bool allowRepeated)
{
if(!isEmpty() && (allowRepeated || front<CoordinateXY>() != back<CoordinateXY>())) {
- m_vect.insert(m_vect.end(),
- m_vect.begin(),
- std::next(m_vect.begin(), stride()));
+ const std::size_t n = stride();
+ const std::size_t old = m_vect.size();
+ m_vect.resize(old + n);
+ std::copy_n(m_vect.data(), n, m_vect.data() + old);
}
}
-----------------------------------------------------------------------
Summary of changes:
src/geom/CoordinateSequence.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list