[SCM] PostGIS branch master updated. 3.7.0rc1-99-gfdfed4b3a
git at osgeo.org
git at osgeo.org
Thu Oct 8 22:08:43 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 fdfed4b3ae6100efdfba36576cc80414552348a7 (commit)
from 0892d6a50707b17c9da4186be8b2a540bb60083a (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 fdfed4b3ae6100efdfba36576cc80414552348a7
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>
diff --git a/raster/rt_core/rt_context.c b/raster/rt_core/rt_context.c
index 6483e5f50..28943b4fd 100644
--- a/raster/rt_core/rt_context.c
+++ b/raster/rt_core/rt_context.c
@@ -265,6 +265,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:
raster/rt_core/rt_context.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list