[PATCH] io: Reject an empty path list on fts_open [BZ #25434] [BZ #34610]

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Fri Sep 11 13:10:44 GMT 2026



On 11/09/26 09:24, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> An empty path list (argv[0] == NULL) yields an FTS handle that can not
>> be used.
> 
> Wouldn't it be conceptually clearer to succeed, but then do not offer up
> anything?
I am not sure, different implementation have different ideas:

* FreeBSD/OpenBSD/Solaris returns NULL/EINVAL.
* macOS/musl returns an invalid handle that SEGFAULTS on next fts_read.

This at least is a simpler fix, to follow your suggestion would be a bit
more complex and would make glibc different than rest.


More information about the Libc-alpha mailing list