Skip to content
Snippets Groups Projects
Commit c9f4bf9f authored by yang-g's avatar yang-g
Browse files

get rid of the trailing null in path

parent f3d9b480
No related branches found
No related tags found
No related merge requests found
......@@ -341,11 +341,8 @@ static grpc_error *hc_mutate_op(grpc_exec_ctx *exec_ctx,
/* remove trailing unused memory and add trailing 0 to terminate string
*/
char *t = (char *)GRPC_SLICE_START_PTR(path_with_query_slice);
/* safe to use strlen since base64_encode will always add '\0' */
size_t path_length = strlen(t) + 1;
*(t + path_length) = '\0';
path_with_query_slice =
grpc_slice_sub(path_with_query_slice, 0, path_length);
grpc_slice_sub(path_with_query_slice, 0, strlen(t));
/* substitute previous path with the new path+query */
grpc_mdelem mdelem_path_and_query = grpc_mdelem_from_slices(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment