From 6d5485b97cd46f81512e9198ac7c59c7ba1d9247 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 26 Oct 2026 21:50:09 +0100 Subject: Potentially overlapping areas need memmove, not memcpy --- ot_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ot_stats.c b/ot_stats.c index bee1f93..53bd749 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -175,8 +175,8 @@ static size_t stats_get_highscore_networks(stats_network_node *node, int depth, ++j; --j; - memcpy(scores, scores + 1, j * sizeof(*scores)); - memcpy(networks, networks + 1, j * sizeof(*networks)); + memmove(scores, scores + 1, j * sizeof(*scores)); + memmove(networks, networks + 1, j * sizeof(*networks)); scores[j] = node_score; memcpy(networks + j, node_value, sizeof(*networks)); } -- cgit v1.3