[SCM] PostGIS branch master updated. 3.6.0beta1-2-gabff15a33
git at osgeo.org
git at osgeo.org
Mon Jul 21 10:08:19 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 "PostGIS".
The branch, master has been updated
via abff15a335b1552768ec519be27cf94360b29d2e (commit)
from c68967c3c9a067d3ccc0dbef071bb1bf3d23fbf5 (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 abff15a335b1552768ec519be27cf94360b29d2e
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Jul 21 19:07:32 2025 +0200
Do not pass a NULL pointer to lwrepalloc
References #5947 in master branch (3.6.0dev)
diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index adccbb364..82a3835e4 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -230,9 +230,17 @@ ptarray_append_ptarray(POINTARRAY *pa1, POINTARRAY *pa2, double gap_tolerance)
ncap = pa1->npoints + npoints;
if ( pa1->maxpoints < ncap )
{
- pa1->maxpoints = ncap > pa1->maxpoints*2 ?
- ncap : pa1->maxpoints*2;
- pa1->serialized_pointlist = lwrealloc(pa1->serialized_pointlist, (size_t)ptsize * pa1->maxpoints);
+ if ( pa1->maxpoints )
+ {
+ pa1->maxpoints = ncap > pa1->maxpoints*2 ?
+ ncap : pa1->maxpoints*2;
+ pa1->serialized_pointlist = lwrealloc(pa1->serialized_pointlist, (size_t)ptsize * pa1->maxpoints);
+ }
+ else
+ {
+ pa1->maxpoints = ncap;
+ pa1->serialized_pointlist = lwalloc((size_t)ptsize * pa1->maxpoints);
+ }
}
memcpy(getPoint_internal(pa1, pa1->npoints),
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/ptarray.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list