aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/test/test_write_format_pax.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
committerMartin Matuska <mm@FreeBSD.org>2017-05-03 23:55:12 +0000
commit87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9 (patch)
treeb8ac4af3d780f51917c8a060892b1633cce98aca /libarchive/test/test_write_format_pax.c
parent659b8836cb5cd1ff479c8644211f190e1ad9619d (diff)
downloadsrc-87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9.tar.gz
src-87a07d9d6c9aca33aa7189ddf8dc13fd4ed795e9.zip
Update vendor/libarchive to git c253f0aae9ac86a617b4f814137e07757df72391
Vendor changes (FreeBSD-related): PR 897: test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes
Notes
Notes: svn path=/vendor/libarchive/dist/; revision=317781
Diffstat (limited to 'libarchive/test/test_write_format_pax.c')
-rw-r--r--libarchive/test/test_write_format_pax.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libarchive/test/test_write_format_pax.c b/libarchive/test/test_write_format_pax.c
index 1bae0050f081..41a423a96a0e 100644
--- a/libarchive/test/test_write_format_pax.c
+++ b/libarchive/test/test_write_format_pax.c
@@ -80,13 +80,19 @@ DEFINE_TEST(test_write_format_pax)
/*
* "file3" is sparse file and has hole size of which is
* 1024000 bytes, and has 8 bytes data after the hole.
+ *
+ * Pad the filename to make it larger than the ustar limit.
+ * It should still read back correctly.
*/
assert((ae = archive_entry_new()) != NULL);
archive_entry_set_atime(ae, 2, 20);
archive_entry_set_birthtime(ae, 3, 30);
archive_entry_set_ctime(ae, 4, 40);
archive_entry_set_mtime(ae, 5, 50);
- archive_entry_copy_pathname(ae, "file3");
+ archive_entry_copy_pathname(ae, "file3"
+ "_123456789_123456789_123456789_123456789_123456789"
+ "_123456789_123456789_123456789_123456789_123456789"
+ "_123456789_123456789_123456789_123456789_123456789");
archive_entry_set_mode(ae, S_IFREG | 0755);
archive_entry_set_size(ae, 1024008);
archive_entry_sparse_add_entry(ae, 1024000, 8);
@@ -171,7 +177,11 @@ DEFINE_TEST(test_write_format_pax)
assertEqualInt(40, archive_entry_ctime_nsec(ae));
assertEqualInt(5, archive_entry_mtime(ae));
assertEqualInt(50, archive_entry_mtime_nsec(ae));
- assertEqualString("file3", archive_entry_pathname(ae));
+ assertEqualString("file3"
+ "_123456789_123456789_123456789_123456789_123456789"
+ "_123456789_123456789_123456789_123456789_123456789"
+ "_123456789_123456789_123456789_123456789_123456789",
+ archive_entry_pathname(ae));
assert((S_IFREG | 0755) == archive_entry_mode(ae));
assertEqualInt(1024008, archive_entry_size(ae));
assertEqualInt(1, archive_entry_sparse_reset(ae));