PostGIS  2.2.8dev-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 111 of file lwin_wkb.c.

References lwerror(), wkb_parse_state::pos, wkb_parse_state::wkb, and wkb_parse_state::wkb_size.

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

112 {
113  if( (s->pos + next) > (s->wkb + s->wkb_size) )
114  lwerror("WKB structure does not match expected size!");
115 }
const uint8_t * wkb
Definition: lwin_wkb.c:23
size_t wkb_size
Definition: lwin_wkb.c:24
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
const uint8_t * pos
Definition: lwin_wkb.c:32
Here is the call graph for this function:
Here is the caller graph for this function: