Fix: memcpy used on potentially overlapping regions
[lttng-tools.git] / src / common / utils.c
index a068e410b4bf26800d38e5807a0fb06c884f70d6..7006a21581ea91f952c7d7dbe57a1095d467979e 100644 (file)
@@ -294,7 +294,7 @@ int expand_double_slashes_dot_and_dotdot(char *path)
                 * Copy the current token which is neither a '.' nor a '..'.
                 */
                path[expanded_path_len++] = '/';
                 * Copy the current token which is neither a '.' nor a '..'.
                 */
                path[expanded_path_len++] = '/';
-               memcpy(&path[expanded_path_len], curr_char, curr_token_len);
+               memmove(&path[expanded_path_len], curr_char, curr_token_len);
                expanded_path_len += curr_token_len;
        }
 
                expanded_path_len += curr_token_len;
        }
 
This page took 0.031722 seconds and 4 git commands to generate.