diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2017-07-19 00:48:15 +0200 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2017-07-19 00:48:15 +0200 |
commit | 98f513fb8fa5e3360baeb59c37636ca71d562490 (patch) | |
tree | d22087878f81edeecf988b8aa22ea6eea9ed1461 /upb/decode.c | |
parent | 6b8767422154008eed98d0df42e36758d38877a4 (diff) |
Fixed 32-bit build and added generated files.
Diffstat (limited to 'upb/decode.c')
-rw-r--r-- | upb/decode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/upb/decode.c b/upb/decode.c index cba9f61..8c3ecb4 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -116,7 +116,9 @@ static bool upb_decode_string(const char **ptr, const char *limit, upb_stringview *val) { uint32_t len; - CHK(upb_decode_varint32(ptr, limit, &len) && limit - *ptr >= len); + CHK(upb_decode_varint32(ptr, limit, &len) && + len < INT32_MAX && + limit - *ptr >= (int32_t)len); *val = upb_stringview_make(*ptr, len); *ptr += len; |