]> granicus.if.org Git - postgis/commitdiff
#2720, lwpoly_add_ring should update maxrings after realloc
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 22 Aug 2014 21:38:45 +0000 (21:38 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 22 Aug 2014 21:38:45 +0000 (21:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12911 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwpoly.c

index 04c495045176af408aa73472be4d561a808f9271..de475793ced449004050a1fc4effb8da66eb0405 100644 (file)
@@ -161,6 +161,7 @@ lwpoly_add_ring(LWPOLY *poly, POINTARRAY *pa)
        {
                int new_maxrings = 2 * (poly->nrings + 1);
                poly->rings = lwrealloc(poly->rings, new_maxrings * sizeof(POINTARRAY*));
+               poly->maxrings = new_maxrings;
        }
        
        /* Add the new ring entry. */