]> git.ipfire.org Git - thirdparty/libarchive.git/commit
iso9660: Fix ../../ path normalization 2968/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 19 Apr 2026 20:10:10 +0000 (22:10 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sun, 19 Apr 2026 20:17:13 +0000 (22:17 +0200)
commit941e32fd6e37ab7e2441605eebdcd04b9616d60d
tree598751f8f5f6796ae3dd4de448622e1f97d77daf
parent8903139075ea7e0ecc2293d409d72232174d7e61
iso9660: Fix ../../ path normalization

The function isofile_gen_utility_names could resolve .. directory
entries in a way that dirname will start with "../". If this happens,
the while-loop is unable to detect this because it forwards until the
cursor detects a slash again.

Fix this by also taking "../" at the beginning into account. Such an
entry can happen if "../../" points before the top directory.

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