[SCM] PostGIS branch stable-3.3 updated. 3.3.7-70-g05ba89e6e

git at osgeo.org git at osgeo.org
Mon Feb 2 07:36:20 PST 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.3 has been updated
       via  05ba89e6e2a9cc3761ea8b21773a6d9fbc9acdd9 (commit)
      from  d5bd4360404cee5cd6b033551b75fa67407904b5 (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 05ba89e6e2a9cc3761ea8b21773a6d9fbc9acdd9
Author: Maksim Korotkov <m.korotkov at postgrespro.ru>
Date:   Mon Feb 2 16:08:43 2026 +0300

    Fix memory allocation size for arrays in flatgeobuf_decode_row
    The original code incorrectly allocated memory for pointers
    instead of the actual types, potentially causing buffer
    overflows or memory corruption since it was allocating
    insufficient memory (size of pointer instead of size of Datum/bool).
    
    Found by PostgesPro.
    Fixes: 3ae2c5844 ("FlatGeobuf format input/output")
    Signed-off-by: Maksim Korotkov <m.korotkov at postgrespro.ru>

diff --git a/postgis/flatgeobuf.c b/postgis/flatgeobuf.c
index e98d6a65b..b4e2f3340 100644
--- a/postgis/flatgeobuf.c
+++ b/postgis/flatgeobuf.c
@@ -467,8 +467,8 @@ void flatgeobuf_decode_row(struct flatgeobuf_decode_ctx *ctx)
 	HeapTuple heapTuple;
 	uint32_t natts = ctx->tupdesc->natts;
 
-	Datum *values = palloc0(natts * sizeof(Datum *));
-	bool *isnull = palloc0(natts * sizeof(bool *));
+	Datum *values = palloc0(natts * sizeof(Datum));
+	bool *isnull = palloc0(natts * sizeof(bool));
 
 	values[0] = Int32GetDatum(ctx->fid);
 

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

Summary of changes:
 postgis/flatgeobuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list