fix a fuzzer detected corner case

pull/10222/head
Makarand Dharmapurikar 8 years ago
parent 7b02dd6f30
commit ce0fd978e1
  1. 4
      src/core/lib/channel/http_server_filter.c

@ -209,6 +209,7 @@ static grpc_error *server_filter_incoming_metadata(grpc_exec_ctx *exec_ctx,
for (offset = 0; *path_ptr != k_query_separator[0] && offset < path_length;
path_ptr++, offset++)
;
if (offset < path_length) {
grpc_slice query_slice =
grpc_slice_sub(path_slice, offset + 1, path_length);
@ -229,6 +230,9 @@ static grpc_error *server_filter_incoming_metadata(grpc_exec_ctx *exec_ctx,
grpc_slice_buffer_stream_init(&calld->read_stream,
&calld->read_slice_buffer, 0);
calld->seen_path_with_query = true;
} else {
gpr_log(GPR_ERROR, "GET request without QUERY");
}
}
if (b->idx.named.host != NULL && b->idx.named.authority == NULL) {

Loading…
Cancel
Save