diff options
author | Martin Matuska <martin@matuska.org> | 2017-07-29 01:12:46 +0200 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2017-07-29 01:14:13 +0200 |
commit | de20494ba2a4fcff8b56010faa75467ad8d5a40b (patch) | |
tree | 6bc9df290e21a8ed8cc175435edcd11e903b9c9f /libarchive/archive_write_set_format_ar.c | |
parent | 64076d16a3d262a49ad871ffa54612d639ea0b26 (diff) | |
download | libarchive-de20494ba2a4fcff8b56010faa75467ad8d5a40b.tar.gz |
archive_write_ar_data(): replace strncpy() with memcpy()
Diffstat (limited to 'libarchive/archive_write_set_format_ar.c')
-rw-r--r-- | libarchive/archive_write_set_format_ar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_write_set_format_ar.c b/libarchive/archive_write_set_format_ar.c index 6fab9d66..441119d5 100644 --- a/libarchive/archive_write_set_format_ar.c +++ b/libarchive/archive_write_set_format_ar.c @@ -380,7 +380,7 @@ archive_write_ar_data(struct archive_write *a, const void *buff, size_t s) "Can't allocate strtab buffer"); return (ARCHIVE_FATAL); } - strncpy(ar->strtab, buff, s); + memcpy(ar->strtab, buff, s); ar->strtab[s] = '\0'; ar->has_strtab = 1; } |