diff options
Diffstat (limited to 'src/core/support/subprocess_posix.c')
-rw-r--r-- | src/core/support/subprocess_posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/support/subprocess_posix.c b/src/core/support/subprocess_posix.c index b4631fa0ed..171054e4da 100644 --- a/src/core/support/subprocess_posix.c +++ b/src/core/support/subprocess_posix.c @@ -66,8 +66,8 @@ gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) { if (pid == -1) { return NULL; } else if (pid == 0) { - exec_args = gpr_malloc((argc + 1) * sizeof(char *)); - memcpy(exec_args, argv, argc * sizeof(char *)); + exec_args = gpr_malloc(((size_t)argc + 1) * sizeof(char *)); + memcpy(exec_args, argv, (size_t)argc * sizeof(char *)); exec_args[argc] = NULL; execv(exec_args[0], exec_args); /* if we reach here, an error has occurred */ |