[postgis-tickets] r15962 - Add returns after lwerror() for testing harnesses
Paul Ramsey
pramsey at cleverelephant.ca
Tue Oct 10 15:51:02 PDT 2017
Author: pramsey
Date: 2017-10-10 15:51:02 -0700 (Tue, 10 Oct 2017)
New Revision: 15962
Modified:
trunk/liblwgeom/lwin_wkb.c
Log:
Add returns after lwerror() for testing harnesses
Modified: trunk/liblwgeom/lwin_wkb.c
===================================================================
--- trunk/liblwgeom/lwin_wkb.c 2017-10-10 22:46:08 UTC (rev 15961)
+++ trunk/liblwgeom/lwin_wkb.c 2017-10-10 22:51:02 UTC (rev 15962)
@@ -125,7 +125,10 @@
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 @@
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);
More information about the postgis-tickets
mailing list