diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-08-19 15:49:29 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-08-19 15:49:29 -0700 |
commit | 1e870951d7707d45fa7104658a4dde177d9fb62e (patch) | |
tree | a307fbb9bf6dbd7930be74ff481631486dc3b494 /upb/pb/decoder.int.h | |
parent | 146a9c22efac6cb746ef4024144f28af891dd2b4 (diff) |
Refer to a shared definition for max buffered bytes.
Diffstat (limited to 'upb/pb/decoder.int.h')
-rw-r--r-- | upb/pb/decoder.int.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/upb/pb/decoder.int.h b/upb/pb/decoder.int.h index b7e462b..f2bf242 100644 --- a/upb/pb/decoder.int.h +++ b/upb/pb/decoder.int.h @@ -218,11 +218,8 @@ struct upb_pbdecoder { /* Overall stream offset of "buf." */ uint64_t bufstart_ofs; - /* Buffer for residual bytes not parsed from the previous buffer. - * The maximum number of residual bytes we require is 12; a five-byte - * unknown tag plus a ten-byte value, less one because the value - * is only a partial value. */ - char residual[14]; + /* Buffer for residual bytes not parsed from the previous buffer. */ + char residual[UPB_DECODER_MAX_RESIDUAL_BYTES]; char *residual_end; /* Bytes of data that should be discarded from the input beore we start |