summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-07-06 14:22:14 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-07-06 14:22:14 -0700
commit5bfef1bc8e8514640ae40e66bc4dc391e9dd6b8f (patch)
tree7d3b18947207a170148c8092041d90c623ff9efe
parentb94a9f2101683888218cbf4de9be2139b3816403 (diff)
Added a little note for upb_parse.
-rw-r--r--upb_parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/upb_parse.c b/upb_parse.c
index 2af8e86..b29ee2e 100644
--- a/upb_parse.c
+++ b/upb_parse.c
@@ -253,6 +253,8 @@ void upb_parse_init(struct upb_parse_state *state, size_t udata_size)
state->offset = 0;
size_t stack_bytes = (sizeof(*state->stack) + udata_size) * UPB_MAX_NESTING;
state->stack = state->top = malloc(stack_bytes);
+ /* The top-level message is not delimited (we can keep receiving data for
+ * it indefinitely). */
state->top->end_offset = SIZE_MAX;
state->limit = (struct upb_parse_stack_frame*)((char*)state->stack + stack_bytes);
state->udata_size = udata_size;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback