diff options
author | jboeuf <jboeuf@users.noreply.github.com> | 2015-01-28 19:16:47 -0800 |
---|---|---|
committer | jboeuf <jboeuf@users.noreply.github.com> | 2015-01-28 19:16:47 -0800 |
commit | 59a1f610b2fda6f88f186f9762fef54f979985c2 (patch) | |
tree | 71aee935906bddcc95f124e00f3d69d329ce6c65 | |
parent | 3a2c4cda3c8522d4e9d05c865011f15fb74bd18d (diff) | |
parent | a2a03d488ff8459e5001f158a6b9ce72c6e2133f (diff) |
Merge pull request #273 from nicolasnoble/memcpy
Cleaning up some code.
-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'; |