]> Sergey Matveev's repositories - bfs.git/commit
bftw: Make sure we don't close a directory while we unwrap it
authorTavian Barnes <tavianator@tavianator.com>
Thu, 12 Oct 2023 19:50:59 +0000 (15:50 -0400)
committerTavian Barnes <tavianator@tavianator.com>
Thu, 12 Oct 2023 19:50:59 +0000 (15:50 -0400)
commitd64a32e03b4d9a1336ebfa66d7d08d96e9847a6a
tree9ff9c5a4831e2cdb37cb9771dc9fb254216b7042
parent773f4a446f03da62d88e6d17be49fdc0a3e38465
bftw: Make sure we don't close a directory while we unwrap it

bftw_cache_reserve() can lead to bftw_cache_pop(), which could close the
directory we're trying to unwrap!  If that happened, we would try
dup_cloexec(-1), which would fail with EBADF, so there was no observable
bug.  But it's better to avoid the whole situation.
src/bftw.c