musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/regex/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/glob.c')
-rw-r--r--src/regex/glob.c 2
1 files changed, 2 insertions, 0 deletions
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)) {
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月20日 10:26:22 +0000

AltStyle によって変換されたページ (->オリジナル) /