diff options
author | Roland McGrath <roland@gnu.org> | 1995-08-07 21:45:04 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-08-07 21:45:04 +0000 |
commit | b25c5d66b27045e44e435dbc65b6213840d377f6 (patch) | |
tree | 78b446fbaa5a428221ba12eb32c6ed8b88fa5841 /posix/glob.c | |
parent | 99a9e88e55c4cb46ce645aedac3e5d1a906dfd69 (diff) | |
download | glibc-b25c5d66b27045e44e435dbc65b6213840d377f6.tar glibc-b25c5d66b27045e44e435dbc65b6213840d377f6.tar.gz glibc-b25c5d66b27045e44e435dbc65b6213840d377f6.tar.bz2 glibc-b25c5d66b27045e44e435dbc65b6213840d377f6.zip |
* stdlib/strtol.c: Use #ifdef, not #if, for HAVE_LIMITS_H.
* posix/glob.c (glob_in_dir): Allocate GLOB_MARK byte in case when
(NFOUND == 0 && (FLAGS & GLOB_NOCHECK)).
Diffstat (limited to 'posix/glob.c')
-rw-r--r-- | posix/glob.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/glob.c b/posix/glob.c index 38a6d75ab2..1354150653 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -635,7 +635,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob) nfound = 1; names = (struct globlink *) __alloca (sizeof (struct globlink)); names->next = NULL; - names->name = (char *) malloc (len + 1); + names->name = (char *) malloc (len + ((flags & GLOB_MARK) ? 1 : 0) + 1); if (names->name == NULL) goto memory_error; memcpy (names->name, pattern, len); |