[SCM] PostGIS branch stable-3.6 updated. 3.6.1-20-g3d64dfde0

git at osgeo.org git at osgeo.org
Mon Feb 2 07:35:56 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.6 has been updated
       via  3d64dfde01432a157f37ce3694c22d24f4d65776 (commit)
      from  54b890ef9226adf295850600b85984a933676fb9 (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 3d64dfde01432a157f37ce3694c22d24f4d65776
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 e6c5f5c87..eb29f8920 100644
--- a/postgis/flatgeobuf.c
+++ b/postgis/flatgeobuf.c
@@ -466,8 +466,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