[SCM] PostGIS branch stable-3.5 updated. 3.5.7-2-gaf18826ce

git at osgeo.org git at osgeo.org
Mon Jun 22 14:34:59 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.5 has been updated
       via  af18826ce1375c9bd518a7bf6e71e9bc4b4bfdff (commit)
      from  b1bf0d52d1f1eb043b2b6aeecfd2edec4cdb65c8 (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 af18826ce1375c9bd518a7bf6e71e9bc4b4bfdff
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Jun 22 14:34:08 2026 -0700

    Avoid out-of-bounds write, uninitialized memory.

diff --git a/extensions/address_standardizer/gamma.c b/extensions/address_standardizer/gamma.c
index 0824c6535..d802e86fb 100644
--- a/extensions/address_standardizer/gamma.c
+++ b/extensions/address_standardizer/gamma.c
@@ -122,7 +122,7 @@ RULES *rules_init( ERR_PARAM *err_p ) {
     rules->rule_number = 0;
     rules->last_node = EPSILON;
 
-    PAGC_ALLOC_STRUC(r_p,RULE_PARAM,err_p,NULL) ;
+    PAGC_CALLOC_STRUC(r_p,RULE_PARAM,1,err_p,NULL) ;
     rules->r_p = r_p;
 
     /* -- initialize the statistics record -- */
diff --git a/extensions/address_standardizer/std_pg_hash.c b/extensions/address_standardizer/std_pg_hash.c
index 63f490415..a83be783a 100644
--- a/extensions/address_standardizer/std_pg_hash.c
+++ b/extensions/address_standardizer/std_pg_hash.c
@@ -534,12 +534,12 @@ static int parse_rule(char *buf, int *rule)
 
 
     while (1) {
+        if (nr >= MAX_RULE_LENGTH) return -1;
         *r = strtol( p, &q, 10 );
         if (p == q) break;
         p = q;
         nr++;
         r++;
-        if (nr > MAX_RULE_LENGTH) return -1;
     }
 
     return nr;

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

Summary of changes:
 extensions/address_standardizer/gamma.c       | 2 +-
 extensions/address_standardizer/std_pg_hash.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list