PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ wkb_parse_state_check()

static void wkb_parse_state_check ( wkb_parse_state s,
size_t  next 
)
inlinestatic

Check that we are not about to read off the end of the WKB array.

Definition at line 131 of file lwin_wkb.c.

132 {
133  if( (s->pos + next) > (s->wkb + s->wkb_size) )
134  {
135  lwerror("WKB structure does not match expected size!");
136  s->error = LW_TRUE;
137  }
138 }
char * s
Definition: cu_in_wkt.c:23
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:107
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190

References LW_TRUE, lwerror(), and s.

Referenced by byte_from_wkb_state(), integer_from_wkb_state(), lwpoint_from_wkb_state(), and ptarray_from_wkb_state().

Here is the call graph for this function:
Here is the caller graph for this function: