aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/chttp2/hpack_parser.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 14:43:18 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 14:43:18 -0700
commitf96dfc3cf89f0e10a5356ca1bcfd4697410a75c4 (patch)
tree81040d4efce2bb330a213d3ea54ae6e64c3c4870 /src/core/transport/chttp2/hpack_parser.c
parent0ebfaa04b0cd38ccf273746195ca8c8ac7f7d4d6 (diff)
First round of fixing up implicit 64->32 bit conversions
Diffstat (limited to 'src/core/transport/chttp2/hpack_parser.c')
-rw-r--r--src/core/transport/chttp2/hpack_parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c
index f806f59ed7..93a452f1fd 100644
--- a/src/core/transport/chttp2/hpack_parser.c
+++ b/src/core/transport/chttp2/hpack_parser.c
@@ -1085,7 +1085,8 @@ static int parse_string_prefix(grpc_chttp2_hpack_parser *p,
static void append_bytes(grpc_chttp2_hpack_parser_string *str,
const gpr_uint8 *data, size_t length) {
if (length + str->length > str->capacity) {
- str->capacity = str->length + length;
+ GPR_ASSERT(str->length + length <= GPR_UINT32_MAX);
+ str->capacity = (gpr_uint32)(str->length + length);
str->str = gpr_realloc(str->str, str->capacity);
}
memcpy(str->str + str->length, data, length);