From 739ccbe6c00a03b27fd52423e828f1c4c3bc90c2 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Wed, 16 Jul 2008 08:42:34 +0000 Subject: [PATCH] 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. git-svn-id: http://svn.osgeo.org/postgis/trunk@2864 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_estimate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lwgeom/lwgeom_estimate.c b/lwgeom/lwgeom_estimate.c index 6c6e107cb..f388b2edf 100644 --- a/lwgeom/lwgeom_estimate.c +++ b/lwgeom/lwgeom_estimate.c @@ -990,8 +990,8 @@ compute_geometry_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, 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; -- 2.50.1