]> granicus.if.org Git - postgis/commitdiff
Fix undefined behavior in ptarray_calculate_gbox_geodetic (#2774)
authorSandro Santilli <strk@keybit.net>
Fri, 27 Jun 2014 07:38:02 +0000 (07:38 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 27 Jun 2014 07:38:02 +0000 (07:38 +0000)
Patch by Paul Ramsey

git-svn-id: http://svn.osgeo.org/postgis/trunk@12676 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgeodetic.c

index 84cc3f4b794842745f391bfb47d75b290ae88b5c..29a235c5ae1be3a47b0499c8d77d77e1c840a561 100644 (file)
@@ -2484,6 +2484,7 @@ int ptarray_calculate_gbox_geodetic(const POINTARRAY *pa, GBOX *gbox)
        assert(gbox);
        assert(pa);
 
+       gbox_init(&edge_gbox);
        edge_gbox.flags = gbox->flags;
 
        if ( pa->npoints == 0 ) return LW_FAILURE;