summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libarchive/archive_write_set_format_pax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive/archive_write_set_format_pax.c b/libarchive/archive_write_set_format_pax.c
index 3d6b6aa1..4caace51 100644
--- a/libarchive/archive_write_set_format_pax.c
+++ b/libarchive/archive_write_set_format_pax.c
@@ -1647,7 +1647,7 @@ archive_write_pax_data(struct archive_write *a, const void *buff, size_t s)
return (total);
p = ((const unsigned char *)buff) + total;
- ws = s;
+ ws = s - total;
if (ws > pax->sparse_list->remaining)
ws = pax->sparse_list->remaining;