]> granicus.if.org Git - postgis/commitdiff
Add returns after lwerror() for testing harnesses
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 10 Oct 2017 22:51:02 +0000 (22:51 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 10 Oct 2017 22:51:02 +0000 (22:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15962 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwin_wkb.c

index 7a488b2101032b0e039d091d8b6a74ff722972ee..e01275d31d03baa7816f30502bc3919a4f6bd075 100644 (file)
@@ -125,7 +125,10 @@ uint8_t* bytes_from_hexbytes(const char *hexbuf, size_t hexsize)
 static inline void wkb_parse_state_check(wkb_parse_state *s, size_t next)
 {
        if( (s->pos + next) > (s->wkb + s->wkb_size) )
+       {
                lwerror("WKB structure does not match expected size!");
+               return;
+       }
 }
 
 /**
@@ -338,7 +341,8 @@ static POINTARRAY* ptarray_from_wkb_state(wkb_parse_state *s)
        npoints = integer_from_wkb_state(s);
        if (npoints > maxpoints)
        {
-               lwerror("point array length (%d) is too large");
+               lwerror("Pointarray length (%d) is too large");
+               return;
        }
 
        LWDEBUGF(4,"Pointarray has %d points", npoints);