safety fix for glob's vla usage: disallow patterns longer than PATH_MAX
authorRich Felker <dalias@aerifal.cx>
Sun, 5 Jun 2011 23:29:52 +0000 (19:29 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 5 Jun 2011 23:29:52 +0000 (19:29 -0400)
this actually inadvertently disallows some valid patterns with
redundant / or * characters, but it's better than allowing unbounded
vla allocation.

eventually i'll write code to move the pattern to the stack and
eliminate redundancy to ensure that it fits in PATH_MAX at the
beginning of glob. this would also allow it to be modified in place
for passing to fnmatch rather than copied at each level of recursion.


No differences found