/* Prepend magic code to ignore options for
* a format or modules which are not added to
* the archive read object. */
- strncpy(p, IGNORE_WRONG_MODULE_NAME,
- sizeof(IGNORE_WRONG_MODULE_NAME) -1);
- strcpy(p + sizeof(IGNORE_WRONG_MODULE_NAME) -1, reader_options);
+ sprintf(p, "%s%s", IGNORE_WRONG_MODULE_NAME,
+ reader_options);
r = archive_read_set_options(a, p);
free(p);
if (r == ARCHIVE_FATAL)
/* Prepend magic code to ignore options for
* a format or filters which are not added to
* the archive write object. */
- strncpy(p, IGNORE_WRONG_MODULE_NAME,
- sizeof(IGNORE_WRONG_MODULE_NAME) -1);
- strcpy(p + sizeof(IGNORE_WRONG_MODULE_NAME) -1, writer_options);
+ sprintf(p, "%s%s", IGNORE_WRONG_MODULE_NAME,
+ writer_options);
r = archive_write_set_options(a, p);
free(p);
if (r < ARCHIVE_WARN)
/* Prepend magic code to ignore options for
* a format or filters which are not added to
* the archive write object. */
- strncpy(p, IGNORE_WRONG_MODULE_NAME,
- sizeof(IGNORE_WRONG_MODULE_NAME) -1);
- strcpy(p + sizeof(IGNORE_WRONG_MODULE_NAME) -1, reader_options);
+ sprintf(p, "%s%s", IGNORE_WRONG_MODULE_NAME,
+ reader_options);
r = archive_read_set_options(a, p);
free(p);
if (r < ARCHIVE_WARN)