diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-08 23:23:45 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-08 23:23:45 +0000 |
commit | 1cc6acc419dc49c5b6ccc0fd84cfafc19b64b699 (patch) | |
tree | 67427d82ac686252d5ede2fab632534b51d77247 /main/pbx.c | |
parent | 87d8add8d25a6e86023544662e800a653307a241 (diff) |
Use memmove() instead of memcpy() for a case where the buffers overlap.
Once again, valgrind is freaking awesome. That is all.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245610 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index 3b3b1cd6d..6a36f434d 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2927,7 +2927,7 @@ static const char *ast_str_substring(struct ast_str *value, int offset, int leng if (offset > 0) { /* Go ahead and chop off the beginning */ - memcpy(ast_str_buffer(value), ast_str_buffer(value) + offset, ast_str_strlen(value) - offset + 1); + memmove(ast_str_buffer(value), ast_str_buffer(value) + offset, ast_str_strlen(value) - offset + 1); lr -= offset; } |