]> granicus.if.org Git - postgis/commitdiff
Do not assume lwerror long-jumps in ptarray_insert_point
authorSandro Santilli <strk@keybit.net>
Tue, 15 Sep 2015 19:51:13 +0000 (19:51 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 15 Sep 2015 19:51:13 +0000 (19:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14070 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/ptarray.c

index ed383660252fd8cc535af07876edd98b193a02fc..b4716417a5b45d257fadec6b09c9a29fe749e4fb 100644 (file)
@@ -109,7 +109,10 @@ ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, int where)
 
        /* Error out if we have a bad situation */
        if ( pa->npoints > pa->maxpoints )
+       {
                lwerror("npoints (%d) is greated than maxpoints (%d)", pa->npoints, pa->maxpoints);
+               return LW_FAILURE;
+       }
        
        /* Check if we have enough storage, add more if necessary */
        if( pa->npoints == pa->maxpoints )