[postgis-commits] svn - r2864 - trunk/lwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Wed Jul 16 01:42:34 PDT 2008


Author: mcayland
Date: 2008-07-16 01:42:34 -0700 (Wed, 16 Jul 2008)
New Revision: 2864

Modified:
   trunk/lwgeom/lwgeom_estimate.c
Log:
Fix for segfault in ANALYZE due to incorrect use of legacy BOX type within compute_geometry_stats() (Fixes GBT#43). Thanks to Landon Fuller for the bug report and fix.

Modified: trunk/lwgeom/lwgeom_estimate.c
===================================================================
--- trunk/lwgeom/lwgeom_estimate.c	2008-07-16 06:42:00 UTC (rev 2863)
+++ trunk/lwgeom/lwgeom_estimate.c	2008-07-16 08:42:34 UTC (rev 2864)
@@ -990,8 +990,8 @@
 			continue;
 		}
 		if ( ! newhistobox ) {
-			newhistobox = palloc(sizeof(BOX));
-			memcpy(newhistobox, box, sizeof(BOX));
+			newhistobox = palloc(sizeof(BOX2DFLOAT4));
+			memcpy(newhistobox, box, sizeof(BOX2DFLOAT4));
 		} else {
 			if ( box->xmin < newhistobox->xmin )
 				newhistobox->xmin = box->xmin;



More information about the postgis-commits mailing list