]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Use sysconf(_SC_OPEN_MAX) on systems without close_range or closefrom 2707/head
authorFrançois Degros <fdegros@chromium.org>
Wed, 20 Aug 2025 05:45:32 +0000 (15:45 +1000)
committerFrançois Degros <fdegros@chromium.org>
Wed, 20 Aug 2025 05:47:18 +0000 (15:47 +1000)
commitf12d80442c6ecb870c043c075cfacb31a899ff81
tree72614e1ea327c118a2b0ea96c0da0e9e4f83c679
parent23ee7815208fae9fafc9b3cda74908c72db6fa6d
Use sysconf(_SC_OPEN_MAX) on systems without close_range or closefrom

Close all the file descriptors in the range [3 ..
sysconf(_SC_OPEN_MAX)-1] before executing a filter program to avoid
leaking file descriptors into subprocesses.

Bug: https://github.com/libarchive/libarchive/issues/2520
libarchive/filter_fork_posix.c