0
0
mirror of https://github.com/libarchive/libarchive.git synced 2026-01-18 17:11:25 +01:00

We copy from p, not p + module_len

This commit is contained in:
AZero13
2025-12-16 21:38:55 -05:00
parent b51e59bcfb
commit e75e5892fd

View File

@@ -163,7 +163,7 @@ set_writer_options(struct bsdtar *bsdtar, struct archive *a)
* a format or filters which are not added to
* the archive write object. */
memcpy(p, IGNORE_WRONG_MODULE_NAME, module_len);
memcpy(p, writer_options, opt_len);
memcpy(p + module_len, writer_options, opt_len);
r = archive_write_set_options(a, p);
free(p);
if (r < ARCHIVE_WARN)
@@ -196,7 +196,7 @@ set_reader_options(struct bsdtar *bsdtar, struct archive *a)
* a format or filters which are not added to
* the archive write object. */
memcpy(p, IGNORE_WRONG_MODULE_NAME, module_len);
memcpy(p, reader_options, opt_len);
memcpy(p + module_len, reader_options, opt_len);
r = archive_read_set_options(a, p);
free(p);
if (r < ARCHIVE_WARN)