PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ twkb_parse_state_advance()

static void twkb_parse_state_advance ( twkb_parse_state s,
size_t  next 

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

Definition at line 68 of file lwin_twkb.c.

References lwerror(), twkb_parse_state::pos, and twkb_parse_state::twkb_end.

Referenced by byte_from_twkb_state(), twkb_parse_state_double(), twkb_parse_state_uvarint(), twkb_parse_state_varint(), and twkb_parse_state_varint_skip().

69 {
70  if( (s->pos + next) > s->twkb_end)
71  {
72  lwerror("%s: TWKB structure does not match expected size!", __func__);
73  // lwnotice("TWKB structure does not match expected size!");
74  }
76  s->pos += next;
77 }
uint8_t * pos
Definition: lwin_twkb.c:27
uint8_t * twkb_end
Definition: lwin_twkb.c:26
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:74
Here is the call graph for this function:
Here is the caller graph for this function: