[postgis-commits] svn - r2865 - branches/1.3/lwgeom

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Wed Jul 16 01:44:09 PDT 2008


Author: mcayland
Date: 2008-07-16 01:44:09 -0700 (Wed, 16 Jul 2008)
New Revision: 2865

Modified:
   branches/1.3/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: branches/1.3/lwgeom/lwgeom_estimate.c
===================================================================
--- branches/1.3/lwgeom/lwgeom_estimate.c	2008-07-16 08:42:34 UTC (rev 2864)
+++ branches/1.3/lwgeom/lwgeom_estimate.c	2008-07-16 08:44:09 UTC (rev 2865)
@@ -2104,8 +2104,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