[postgis-tickets] r17632 - Fix undefined behaviour in _postgis_gserialized_stats

Raul raul at rmr.ninja
Mon Jul 29 08:32:30 PDT 2019


Author: algunenano
Date: 2019-07-29 08:32:29 -0700 (Mon, 29 Jul 2019)
New Revision: 17632

Modified:
   branches/2.3/NEWS
   branches/2.3/postgis/gserialized_estimate.c
Log:
Fix undefined behaviour in _postgis_gserialized_stats

References #4466



Modified: branches/2.3/NEWS
===================================================================
--- branches/2.3/NEWS	2019-07-29 14:00:07 UTC (rev 17631)
+++ branches/2.3/NEWS	2019-07-29 15:32:29 UTC (rev 17632)
@@ -8,6 +8,7 @@
   - #4388, AddRasterConstraints: Ignore NULLs when generating constraints (Raúl Marín)
   - #4327, Avoid pfree'ing the result of getenv (Raúl Marín)
   - #4406, Throw on invalid characters when decoding geohash (Raúl Marín)
+  - #4466, Fix undefined behaviour in _postgis_gserialized_stats (Raúl Marín)
 
 
 PostGIS 2.3.9

Modified: branches/2.3/postgis/gserialized_estimate.c
===================================================================
--- branches/2.3/postgis/gserialized_estimate.c	2019-07-29 14:00:07 UTC (rev 17631)
+++ branches/2.3/postgis/gserialized_estimate.c	2019-07-29 15:32:29 UTC (rev 17632)
@@ -2002,10 +2002,6 @@
 	if ( ! PG_ARGISNULL(2) )
 		mode = text_p_get_mode(PG_GETARG_TEXT_P(2));
 
-	/* Check if we've been asked to only use stats from parent */
-	if ( ! PG_ARGISNULL(3) )
-		only_parent = PG_GETARG_BOOL(3);
-
 	/* Retrieve the stats object */
 	nd_stats = pg_get_nd_stats_by_name(table_oid, att_text, mode, only_parent);
 	if ( ! nd_stats )



More information about the postgis-tickets mailing list