[PATCH] posix: Avoid a stack overflow when glob is given many trailing slashes [BZ #30635]
Bruno Haible
bruno@clisp.org
Sat Oct 11 11:30:15 GMT 2025
Hi Collin,
> > * posix/glob.c (__glob): Strip trailing slashes before the recursive
> > call, so it is not called for every trailing slash in the pattern.
There is also https://sourceware.org/bugzilla/show_bug.cgi?id=33537,
which produces a similar stack overflow for many consecutive slashes,
not in trailing position.
I can't tell whether it's the same bug or a different bug. But you
may want to look at this one as well: if possible, it would be useful
to have a single fix for both, rather than two fixes in two different
places of the code.
Bruno
More information about the Libc-alpha
mailing list