From 50701f1e92ceccfbbfb9cca3201500de0e7b6729 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 10 Oct 2017 22:51:02 +0000 Subject: [PATCH] Add returns after lwerror() for testing harnesses git-svn-id: http://svn.osgeo.org/postgis/trunk@15962 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/lwin_wkb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/liblwgeom/lwin_wkb.c b/liblwgeom/lwin_wkb.c index 7a488b210..e01275d31 100644 --- a/liblwgeom/lwin_wkb.c +++ b/liblwgeom/lwin_wkb.c @@ -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); -- 2.49.0