author | Rich Felker <dalias@aerifal.cx> | 2011年06月05日 19:29:52 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011年06月05日 19:29:52 -0400 |
commit | 0dc99ac413d8bc054a2e95578475c7122455eee8 (patch) | |
tree | a8222147275ce5c3f8f9b5d12e8853e1a78b8e07 /src/regex/glob.c | |
parent | a6c399cf62bbd88f0f0142fd3e9e1e72bd093bc3 (diff) | |
download | musl-0dc99ac413d8bc054a2e95578475c7122455eee8.tar.gz |
-rw-r--r-- | src/regex/glob.c | 2 |
diff --git a/src/regex/glob.c b/src/regex/glob.c index 9a70f0bc..67f84bcf 100644 --- a/src/regex/glob.c +++ b/src/regex/glob.c @@ -171,6 +171,8 @@ int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), d = ""; } + if (strlen(p) > PATH_MAX) return GLOB_NOSPACE; + if (!errfunc) errfunc = ignore_err; if (!(flags & GLOB_APPEND)) { |