[SCM] PostGIS branch master updated. 3.6.0rc2-539-ga283c9ff4

git at osgeo.org git at osgeo.org
Tue Jun 16 13:28:12 PDT 2026


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  a283c9ff4cf3fc9ec60d1961b313f54c64000b0f (commit)
       via  b746a8ce774f4bf178e6e4b08ac84209746fc8bc (commit)
      from  adef2f6bde7696bdb7f02198e02c02916b3a6da7 (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 a283c9ff4cf3fc9ec60d1961b313f54c64000b0f
Merge: adef2f6bd b746a8ce7
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Tue Jun 16 23:01:48 2026 +0400

    Merge pull request #880 from ProjectMutilation/fix-potential-overlap-memcpy
    
    liblwgeom: fix potential overlapping memory copying


commit b746a8ce774f4bf178e6e4b08ac84209746fc8bc
Author: Maksim Korotkov <m.korotkov at postgrespro.ru>
Date:   Tue Jun 16 15:27:33 2026 +0300

    liblwgeom: fix potential overlapping memory copying
    Using memcpy with overlapping memory regions is undefined behavior
    per C standard. Replace with memmove to safely handle the case when
    src and dst point to the same location
    
    Signed-off-by: Maksim Korotkov <m.korotkov at postgrespro.ru>

diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index 5c6796e75..7631081bc 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -1852,7 +1852,7 @@ ptarray_simplify_in_place(POINTARRAY *pa, double tolerance, uint32_t minpts)
 	{
 		/* If there are 2 points remaining, it has to be first and last as
 		 * we added those at the start */
-		memcpy(pa->serialized_pointlist + pt_size * kept_it,
+		memmove(pa->serialized_pointlist + pt_size * kept_it,
 		       pa->serialized_pointlist + pt_size * (pa->npoints - 1),
 		       pt_size);
 	}

-----------------------------------------------------------------------

Summary of changes:
 liblwgeom/ptarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list