From: Paul Ramsey Date: Fri, 22 Aug 2014 21:38:45 +0000 (+0000) Subject: #2720, lwpoly_add_ring should update maxrings after realloc X-Git-Tag: 2.2.0rc1~879 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94ff368596a43069d6041e9c3953fa65d710fe57;p=postgis #2720, lwpoly_add_ring should update maxrings after realloc git-svn-id: http://svn.osgeo.org/postgis/trunk@12911 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwpoly.c b/liblwgeom/lwpoly.c index 04c495045..de475793c 100644 --- a/liblwgeom/lwpoly.c +++ b/liblwgeom/lwpoly.c @@ -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. */