diff options
Diffstat (limited to 'libarchive/archive_write_set_format_pax.c')
-rw-r--r-- | libarchive/archive_write_set_format_pax.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libarchive/archive_write_set_format_pax.c b/libarchive/archive_write_set_format_pax.c index 2cd31e7aaf0d..3b0f4ae294da 100644 --- a/libarchive/archive_write_set_format_pax.c +++ b/libarchive/archive_write_set_format_pax.c @@ -334,8 +334,7 @@ archive_write_pax_header_xattrs(struct archive_write *a, url_encoded_name = url_encode(name); if (url_encoded_name != NULL) { /* Convert narrow-character to UTF-8. */ - r = archive_strcpy_in_locale( - &(pax->l_url_encoded_name), + r = archive_strcpy_l(&(pax->l_url_encoded_name), url_encoded_name, pax->sconv_utf8); free(url_encoded_name); /* Done with this. */ if (r == 0) @@ -1324,7 +1323,7 @@ archive_write_pax_header(struct archive_write *a, return (ARCHIVE_FATAL); } /* Pad out the end of the entry. */ - r = __archive_write_nulls(a, pax->entry_padding); + r = __archive_write_nulls(a, (size_t)pax->entry_padding); if (r != ARCHIVE_OK) { /* If a write fails, we're pretty much toast. */ return (ARCHIVE_FATAL); @@ -1666,7 +1665,7 @@ archive_write_pax_finish_entry(struct archive_write *a) pax->sparse_list = sb; } } - ret = __archive_write_nulls(a, remaining + pax->entry_padding); + ret = __archive_write_nulls(a, (size_t)(remaining + pax->entry_padding)); pax->entry_bytes_remaining = pax->entry_padding = 0; return (ret); } @@ -1713,7 +1712,7 @@ archive_write_pax_data(struct archive_write *a, const void *buff, size_t s) p = ((const unsigned char *)buff) + total; ws = s - total; if (ws > pax->sparse_list->remaining) - ws = pax->sparse_list->remaining; + ws = (size_t)pax->sparse_list->remaining; if (pax->sparse_list->is_hole) { /* Current block is hole thus we do not write |