diff options
Diffstat (limited to 'src/core/security/json_token.c')
-rw-r--r-- | src/core/security/json_token.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/security/json_token.c b/src/core/security/json_token.c index 82bd9b505a..54cb7931c3 100644 --- a/src/core/security/json_token.c +++ b/src/core/security/json_token.c @@ -216,10 +216,10 @@ static char *dot_concat_and_free_strings(char *str1, char *str2) { size_t result_len = str1_len + 1 /* dot */ + str2_len; char *result = gpr_malloc(result_len + 1 /* NULL terminated */); char *current = result; - strncpy(current, str1, str1_len); + memcpy(current, str1, str1_len); current += str1_len; *(current++) = '.'; - strncpy(current, str2, str2_len); + memcpy(current, str2, str2_len); current += str2_len; GPR_ASSERT((current - result) == result_len); *current = '\0'; |