mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-14 15:19:43 +01:00
Add 1 to malloc'd buffer size for null terminator (#128)
This commit is contained in:
parent
7cfe19fe14
commit
28e9e68f3b
1 changed files with 1 additions and 1 deletions
|
@ -427,7 +427,7 @@ void create_string_arg(grpc_arg* args, size_t i,
|
|||
grpc_arg* arg = args+i;
|
||||
arg->type = GRPC_ARG_STRING;
|
||||
arg->key = translate_arg_key(key);
|
||||
char* storeValue = malloc(sizeof(char)*strlen(value));
|
||||
char* storeValue = malloc(sizeof(char)*(strlen(value)+1));
|
||||
arg->value.string = strcpy(storeValue, value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue