[SCM] PostGIS branch stable-3.6 updated. 3.6.4-151-g5b7cc4e0c

git at osgeo.org git at osgeo.org
Thu Oct 8 22:14:52 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, stable-3.6 has been updated
       via  5b7cc4e0c21da58a219d6e1d72ec2332054250b8 (commit)
       via  18855b8979e6c7e14ab2a49132e6e5b9e94ed685 (commit)
      from  a21c1df7188812b287c408fe6909ad3137fde8bd (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 5b7cc4e0c21da58a219d6e1d72ec2332054250b8
Author: Regina Obe <lr at pcorp.us>
Date:   Fri Oct 9 01:14:17 2026 -0400

    News for https://github.com/postgis/postgis/pull/1180

diff --git a/NEWS b/NEWS
index c8d49e17f..27738d128 100644
--- a/NEWS
+++ b/NEWS
@@ -85,6 +85,8 @@ PostGIS 3.6.5dev
 - #6109, Out-of-bounds heap read in BOX2D_out and BOX2D_expand
   on 65-byte box2d under ASAN (Dennis Tighe, Google)
 - #6127, ToastCacheGetGeometry error on PG20 (Laurenz Albe)
+- GH-1180, [raster] make rtstrdup return NULL
+  on allocation failure (Maksim Korotkov, PostgresPro)
 
 PostGIS 3.6.4
 2026/06/08

commit 18855b8979e6c7e14ab2a49132e6e5b9e94ed685
Author: Maksim Korotkov <m.korotkov at postgrespro.ru>
Date:   Tue Sep 8 16:36:39 2026 +0300

    raster: make rtstrdup return NULL on allocation failure like strdup
    
    Standard strdup returns NULL when it cannot allocate memory for the
    copy; rtstrdup instead unconditionally memcpy'd into the rtalloc result,
    writing through a NULL pointer when the allocation failed. Guard the
    copy behind the allocation check so rtstrdup returns NULL on out of
    memory, mirroring the standard library semantics its name implies.
    
    Signed-off-by: Maksim Korotkov <m.korotkov at postgrespro.ru>
    
    Closes  https://github.com/postgis/postgis/pull/1180 for PostGIS 3.6.5

diff --git a/raster/rt_core/rt_context.c b/raster/rt_core/rt_context.c
index 8ee187cc4..37d9f57f4 100644
--- a/raster/rt_core/rt_context.c
+++ b/raster/rt_core/rt_context.c
@@ -266,6 +266,8 @@ rtstrdup(const char *str) {
 	if (!str) return NULL;
 	sz = strlen(str) + 1;
 	dup = rtalloc(sz);
-	memcpy(dup, str, sz);
+	if (dup) {
+		memcpy(dup, str, sz);
+	}
 	return dup;
 }

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

Summary of changes:
 NEWS                        | 2 ++
 raster/rt_core/rt_context.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list