X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=path.c;h=c1cb54b7b8b478c717861a0205e537ded3fbbfc9;hb=aebd173ffa7a4e67447f0157a14abde7767c54e9;hp=9df447bd6dcfaddf7f05fe5f0b624700ff1f40d7;hpb=04bb50f45dda9aeb755e943cbc9df264cfc8cbc5;p=git.git diff --git a/path.c b/path.c index 9df447bd6..c1cb54b7b 100644 --- a/path.c +++ b/path.c @@ -348,7 +348,7 @@ int normalize_absolute_path(char *buf, const char *path) goto next; } - memcpy(dst, comp_start, comp_len); + memmove(dst, comp_start, comp_len); dst += comp_len; next: comp_start = comp_end; @@ -365,7 +365,7 @@ int normalize_absolute_path(char *buf, const char *path) * path = Canonical absolute path * prefix_list = Colon-separated list of absolute paths * - * Determines, for each path in parent_list, whether the "prefix" really + * Determines, for each path in prefix_list, whether the "prefix" really * is an ancestor directory of path. Returns the length of the longest * ancestor directory, excluding any trailing slashes, or -1 if no prefix * is an ancestor. (Note that this means 0 is returned if prefix_list is