]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 222: Ouch! Pax writer doesn't correctly disassemble sparse
authorTim Kientzle <kientzle@gmail.com>
Mon, 9 Jan 2012 05:47:16 +0000 (00:47 -0500)
committerTim Kientzle <kientzle@gmail.com>
Mon, 9 Jan 2012 05:47:16 +0000 (00:47 -0500)
data when writing it out to the archive.

There's clearly a test missing somewhere around here...

SVN-Revision: 4101

libarchive/archive_write_set_format_pax.c

index 3d6b6aa182ad3e22530de379dfa4d8fd7e55348a..4caace517eac5d655a097f7a52a6b86f762b07c2 100644 (file)
@@ -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;