Fix ubsan failure

pull/11866/head
Craig Tiller 8 years ago
parent cf66f59377
commit bf21f0b025
  1. 6
      src/core/ext/transport/chttp2/transport/parsing.c

@ -446,8 +446,10 @@ static void on_initial_header(grpc_exec_ctx *exec_ctx, void *tp,
} else {
timeout = *cached_timeout;
}
grpc_chttp2_incoming_metadata_buffer_set_deadline(
&s->metadata_buffer[0], grpc_exec_ctx_now(exec_ctx) + timeout);
if (timeout != GRPC_MILLIS_INF_FUTURE) {
grpc_chttp2_incoming_metadata_buffer_set_deadline(
&s->metadata_buffer[0], grpc_exec_ctx_now(exec_ctx) + timeout);
}
GRPC_MDELEM_UNREF(exec_ctx, md);
} else {
const size_t new_size = s->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md);

Loading…
Cancel
Save