[SCM] PostGIS branch master updated. 3.6.0rc2-69-g34ee8312c
git at osgeo.org
git at osgeo.org
Wed Oct 1 14:44:31 PDT 2025
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 34ee8312cdb01171ceb2895d0c4f6124f3e63913 (commit)
via fba69e60f1fc636564afe16b6942a84f9c755a22 (commit)
from a89de164624f1a9024d7912107cd9e6662f0cadb (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 34ee8312cdb01171ceb2895d0c4f6124f3e63913
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Oct 1 14:14:27 2025 -0700
Ensure calloc called with count as first argument
diff --git a/loader/dbfopen.c b/loader/dbfopen.c
index 5611473f4..fa2df7f9a 100644
--- a/loader/dbfopen.c
+++ b/loader/dbfopen.c
@@ -1975,12 +1975,11 @@ DBFReorderFields( DBFHandle psDBF, int* panMap )
return FALSE;
/* a simple malloc() would be enough, but calloc() helps clang static analyzer */
- panFieldOffsetNew = STATIC_CAST(int *, calloc(sizeof(int), psDBF->nFields));
- panFieldSizeNew = STATIC_CAST(int *, calloc(sizeof(int), psDBF->nFields));
- panFieldDecimalsNew = STATIC_CAST(int *, calloc(sizeof(int), psDBF->nFields));
- pachFieldTypeNew = STATIC_CAST(char *, calloc(sizeof(char), psDBF->nFields));
- pszHeaderNew = STATIC_CAST(char*, malloc(sizeof(char) * XBASE_FLDHDR_SZ *
- psDBF->nFields));
+ panFieldOffsetNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+ panFieldSizeNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+ panFieldDecimalsNew = STATIC_CAST(int *, calloc(psDBF->nFields, sizeof(int)));
+ pachFieldTypeNew = STATIC_CAST(char *, calloc(psDBF->nFields, sizeof(char)));
+ pszHeaderNew = STATIC_CAST(char*, malloc(sizeof(char) * XBASE_FLDHDR_SZ * psDBF->nFields));
if( panFieldOffsetNew == SHPLIB_NULLPTR || panFieldSizeNew == SHPLIB_NULLPTR ||
panFieldDecimalsNew == SHPLIB_NULLPTR || pachFieldTypeNew == SHPLIB_NULLPTR ||
diff --git a/loader/shpopen.c b/loader/shpopen.c
index 3fe86874d..903e8a3c2 100644
--- a/loader/shpopen.c
+++ b/loader/shpopen.c
@@ -366,7 +366,7 @@ SHPOpenLL( const char * pszLayer, const char * pszAccess, SAHooks *psHooks )
/* -------------------------------------------------------------------- */
/* Initialize the info structure. */
/* -------------------------------------------------------------------- */
- psSHP = STATIC_CAST(SHPHandle, calloc(sizeof(SHPInfo),1));
+ psSHP = STATIC_CAST(SHPHandle, calloc(1,sizeof(SHPInfo)));
if( psSHP == SHPLIB_NULLPTR )
return SHPLIB_NULLPTR;
@@ -1259,7 +1259,7 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
psObject->nParts = MAX(1,nParts);
psObject->panPartStart = STATIC_CAST(int *,
- calloc(sizeof(int), psObject->nParts));
+ calloc(psObject->nParts, sizeof(int)));
psObject->panPartType = STATIC_CAST(int *,
malloc(sizeof(int) * psObject->nParts));
@@ -1288,13 +1288,13 @@ SHPCreateObject( int nSHPType, int nShapeId, int nParts,
{
size_t nSize = sizeof(double) * nVertices;
psObject->padfX = STATIC_CAST(double *, padfX ? malloc(nSize) :
- calloc(sizeof(double),nVertices));
+ calloc(nVertices, sizeof(double)));
psObject->padfY = STATIC_CAST(double *, padfY ? malloc(nSize) :
- calloc(sizeof(double),nVertices));
+ calloc(nVertices, sizeof(double)));
psObject->padfZ = STATIC_CAST(double *, padfZ && bHasZ ? malloc(nSize) :
- calloc(sizeof(double),nVertices));
+ calloc(nVertices, sizeof(double)));
psObject->padfM = STATIC_CAST(double *, padfM && bHasM ? malloc(nSize) :
- calloc(sizeof(double),nVertices));
+ calloc(nVertices, sizeof(double)));
if( padfX != SHPLIB_NULLPTR )
memcpy(psObject->padfX, padfX, nSize);
if( padfY != SHPLIB_NULLPTR )
commit fba69e60f1fc636564afe16b6942a84f9c755a22
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Oct 1 14:04:33 2025 -0700
Compilation failure in CI, uninit variable nsolids
diff --git a/liblwgeom/lwgeom_sfcgal.c b/liblwgeom/lwgeom_sfcgal.c
index 433c01a51..8aaa9445b 100644
--- a/liblwgeom/lwgeom_sfcgal.c
+++ b/liblwgeom/lwgeom_sfcgal.c
@@ -322,7 +322,7 @@ ptarray_to_SFCGAL(const POINTARRAY *pa, int type)
LWGEOM *
SFCGAL2LWGEOM(const sfcgal_geometry_t *geom, int force3D, int32_t srid)
{
- uint32_t ngeoms, nshells, nsolids;
+ uint32_t ngeoms = 0, nshells = 0, nsolids = 0;
uint32_t i, j, k;
int want3d;
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/lwgeom_sfcgal.c | 2 +-
loader/dbfopen.c | 11 +++++------
loader/shpopen.c | 12 ++++++------
3 files changed, 12 insertions(+), 13 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list