PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ twkb_parse_state_advance()

static void twkb_parse_state_advance ( twkb_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 82 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().

83 {
84  if( (s->pos + next) > s->twkb_end)
85  {
86  lwerror("%s: TWKB structure does not match expected size!", __func__);
87  // lwnotice("TWKB structure does not match expected size!");
88  }
89 
90  s->pos += next;
91 }
uint8_t * pos
Definition: lwin_twkb.c:41
uint8_t * twkb_end
Definition: lwin_twkb.c:40
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
Here is the call graph for this function:
Here is the caller graph for this function: