[geos-commits] [SCM] GEOS branch 3.12 updated. d63038620431c756ac32ba05f31547ecf3a38922
git at osgeo.org
git at osgeo.org
Thu Oct 24 13:53:20 PDT 2024
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.12 has been updated
via d63038620431c756ac32ba05f31547ecf3a38922 (commit)
from 631bf0e2e29aac596a1b06d892b56aec66c68e82 (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 d63038620431c756ac32ba05f31547ecf3a38922
Author: Shuduo Sang <sangshuduo at gmail.com>
Date: Wed Aug 9 08:54:29 2023 +0800
Fix C-API null pointer deref on col (#943)
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 3af41d44d..5de6532d1 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -1184,7 +1184,7 @@ extern "C" {
{
return execute(extHandle, [&]() {
BufferParameters bp;
- //-- use default cap style ROUND
+ //-- use default cap style ROUND
bp.setQuadrantSegments(quadsegs);
if(joinStyle > BufferParameters::JOIN_BEVEL) {
@@ -2069,10 +2069,11 @@ extern "C" {
GeometryCollection *col = dynamic_cast<GeometryCollection*>(collection);
if (!col) {
handle->ERROR_MESSAGE("Parameter collection of GEOSGeom_releaseCollection_r must not be a collection");
+ } else {
+ *ngeoms = static_cast<unsigned int>(col->getNumGeometries());
}
// Early exit on empty/null input
- *ngeoms = static_cast<unsigned int>(col->getNumGeometries());
if (!col || *ngeoms == 0) {
return static_cast<Geometry**>(nullptr);
}
-----------------------------------------------------------------------
Summary of changes:
capi/geos_ts_c.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list