Skip to content

Commit ac194e6

Browse files
committed
Use memcpy instead of strncpy
To silence gcc's warning about "strncpy specified bound depends on the length of the source argument".
1 parent 519e7b6 commit ac194e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/repodata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ repodata_dir2str(Repodata *data, Id did, const char *suf)
388388
comps = stringpool_id2str(data->localpool ? &data->spool : &pool->ss, comp);
389389
l = strlen(comps);
390390
p -= l;
391-
strncpy(p, comps, l);
391+
memcpy(p, comps, l);
392392
parent = dirpool_parent(&data->dirpool, parent);
393393
if (parent)
394394
*--p = '/';

0 commit comments

Comments
 (0)