[SCM] PostGIS branch master updated. 3.4.0rc1-957-g07a73c0f2

git at osgeo.org git at osgeo.org
Thu Feb 29 14:49:59 PST 2024


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  07a73c0f2c5cb07e33fd64dadd24fac35efdc0a5 (commit)
      from  8f341b2a9650b84f3ade64900f0891433145073c (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 07a73c0f2c5cb07e33fd64dadd24fac35efdc0a5
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Feb 29 23:40:18 2024 +0100

    Fix -Werror=format-truncation=1 warning on 32bit
    
    See https://gitlab.com/postgis/postgis/-/jobs/6286428391

diff --git a/loader/shpcommon.c b/loader/shpcommon.c
index 787232397..ec7946778 100644
--- a/loader/shpcommon.c
+++ b/loader/shpcommon.c
@@ -269,7 +269,10 @@ colmap_read(const char *filename, colmap *map, char *errbuf, size_t errbuflen)
     /* Error out if the dbffieldname is > 10 chars */
     if (strlen(map->dbffieldnames[curmapsize]) > 10)
     {
-      snprintf(errbuf, errbuflen, _("ERROR: column map file specifies a DBF field name \"%s\" which is longer than 10 characters"), map->dbffieldnames[curmapsize]);
+      if ( errbuflen <= snprintf(errbuf, errbuflen,
+        _("ERROR: column map file specifies a DBF field name \"%s\" which is longer than 10 characters"),
+        map->dbffieldnames[curmapsize])
+      ) errbuf[errbuflen-1] = '\0';
       return 0;
     }
 

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

Summary of changes:
 loader/shpcommon.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list