From ac194e6f024420c0be72c49def6a80adc33dd4bf Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 26 Jun 2020 15:41:46 +0200 Subject: [PATCH] Use memcpy instead of strncpy To silence gcc's warning about "strncpy specified bound depends on the length of the source argument". --- src/repodata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repodata.c b/src/repodata.c index 4e75b6d6..72f03d48 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -388,7 +388,7 @@ repodata_dir2str(Repodata *data, Id did, const char *suf) comps = stringpool_id2str(data->localpool ? &data->spool : &pool->ss, comp); l = strlen(comps); p -= l; - strncpy(p, comps, l); + memcpy(p, comps, l); parent = dirpool_parent(&data->dirpool, parent); if (parent) *--p = '/'; -- 2.47.2