[postgis-tickets] r17358 - Catch un-defaulted final parameter
Paul Ramsey
pramsey at cleverelephant.ca
Mon Mar 25 11:20:10 PDT 2019
Author: pramsey
Date: 2019-03-25 11:20:10 -0700 (Mon, 25 Mar 2019)
New Revision: 17358
Modified:
trunk/postgis/lwgeom_geos.c
Log:
Catch un-defaulted final parameter
References #4353
Modified: trunk/postgis/lwgeom_geos.c
===================================================================
--- trunk/postgis/lwgeom_geos.c 2019-03-25 17:39:09 UTC (rev 17357)
+++ trunk/postgis/lwgeom_geos.c 2019-03-25 18:20:10 UTC (rev 17358)
@@ -806,8 +806,18 @@
GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0);
double size = PG_GETARG_FLOAT8(1);
- text *params_text = PG_GETARG_TEXT_P(2);
+ text *params_text;
+ if (PG_NARGS() > 2)
+ {
+ params_text = PG_GETARG_TEXT_P(2);
+ }
+ else
+ {
+ params_text = palloc(VARHDRSZ);
+ SET_VARSIZE(params_text, 0);
+ }
+
/* Empty.Buffer() == Empty[polygon] */
if ( gserialized_is_empty(geom1) )
{
More information about the postgis-tickets
mailing list