Fix parsing sub-message field.

Buffer start place needs to be adjusted before parsing sub-message.
pull/13171/head
Bo Yang 7 years ago
parent 681cf4279c
commit 93aaf99347
  1. 1
      upb/decode.c

@ -477,6 +477,7 @@ static bool upb_decode_delimitedfield(upb_decstate *d, upb_decframe *frame,
}
case UPB_DESCRIPTOR_TYPE_MESSAGE:
CHK(val.size <= (size_t)(frame->limit - val.data));
d->ptr -= val.size;
CHK(upb_decode_submsg(d, frame, val.data + val.size, field, 0));
break;
default:

Loading…
Cancel
Save