]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
iso9660: Add adjacent dot dot issue to test suite
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 19 Apr 2026 20:08:23 +0000 (22:08 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 19 Apr 2026 20:16:40 +0000 (22:16 +0200)
If dot dot directory entries point before top directory, it can happen
that "../" will stay at the start of the path.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/test/test_write_format_iso9660.c

index 656a0399ed8836eba03e18ac85690d413b0124ad..7df5a26058b9d58cbf2ce1a7cc3b81df99d9af9a 100644 (file)
@@ -154,7 +154,7 @@ DEFINE_TEST(test_write_format_iso9660)
        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, "dir0/dir1/file1");
+       archive_entry_copy_pathname(ae, "dir0/../../dir0/dir1/file1");
        archive_entry_set_mode(ae, AE_IFREG | 0755);
        archive_entry_set_size(ae, 8);
        archive_entry_set_nlink(ae, 1);