]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Partially revert "Merge pull request #2679 from AZero13/error" 2797/head
authorMartin Matuska <martin@matuska.de>
Mon, 24 Nov 2025 13:02:20 +0000 (14:02 +0100)
committerMartin Matuska <martin@matuska.de>
Mon, 24 Nov 2025 13:16:53 +0000 (14:16 +0100)
commitaac59c1bd5e64bc007aac5e2cbf37f149450ab38
tree8e4e720c048e3266665aa7e51c2162132d79605f
parentce7b3f1c153439649d209610159495d8d8769ac0
Partially revert "Merge pull request #2679 from AZero13/error"

This reverts commit d8aaf88c9feab047139df4cae60d845764a2480a, reversing
changes made to ee49ac81068f93754f004368f2cc72c95a8bf056.

tree_reopen() and tree_dup() return NULL only of they
are unable to allocate memory. Otherwise libarchive enters
ARCHIVE_FATAL if trying to walk an enterable but unreadable
directory.

__archive_ensure_cloexec_flag() operates only on fd >= 0
so there is no need to skip it

I have reimplemented the check around fdopendir()

Reported by: Christian Weisgerber from OpenBSD
libarchive/archive_read_disk_posix.c
libarchive/archive_read_support_format_mtree.c
libarchive/archive_write_disk_posix.c