You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/16 00:19:22 UTC
svn commit: r1532565 -
/subversion/trunk/subversion/libsvn_subr/prefix_string.c
Author: stefan2
Date: Tue Oct 15 22:19:21 2013
New Revision: 1532565
URL: http://svn.apache.org/r1532565
Log:
Fix a memcpy / memmove correctness issue found by valgrind.
* subversion/libsvn_subr/prefix_string.c
(svn_prefix_string__create): use the correct function for overlapping copies
Modified:
subversion/trunk/subversion/libsvn_subr/prefix_string.c
Modified: subversion/trunk/subversion/libsvn_subr/prefix_string.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/prefix_string.c?rev=1532565&r1=1532564&r2=1532565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/prefix_string.c (original)
+++ subversion/trunk/subversion/libsvn_subr/prefix_string.c Tue Oct 15 22:19:21 2013
@@ -219,7 +219,7 @@ svn_prefix_string__create(svn_prefix_tre
new_node->sub_nodes = apr_palloc(tree->pool, sizeof(node_t *));
new_node->sub_nodes[0] = sub_node;
- memcpy(sub_node->key.data, sub_node->key.data + match, 8 - match);
+ memmove(sub_node->key.data, sub_node->key.data + match, 8 - match);
/* replace old sub-node with new one and continue lookup */
sub_node->key.prefix = new_node;