[Toybox] [PATCH] dirtree: Prevent calling closedir() on null pointer

Kana Steimle kanasteimle at gmail.com
Mon Dec 9 10:05:21 PST 2024


While glibc gracefully ignores calling closedir() on a null pointer,
musl will instead segfault, which causes programs that rely on
dirtree_recurse or dirtree_flagread (cp, du, find, tar...) to segfault
if it encounters a directory it isn't able to open. This patch
prevents that from happening.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toybox-dirtree_dontclosenull.patch
Type: text/x-patch
Size: 510 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20241209/1c6af34e/attachment.bin>


More information about the Toybox mailing list