summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-08-07 21:45:04 +0000
committerRoland McGrath <roland@gnu.org>1995-08-07 21:45:04 +0000
commitb25c5d66b27045e44e435dbc65b6213840d377f6 (patch)
tree78b446fbaa5a428221ba12eb32c6ed8b88fa5841 /posix
parent99a9e88e55c4cb46ce645aedac3e5d1a906dfd69 (diff)
downloadglibc-b25c5d66b27045e44e435dbc65b6213840d377f6.tar.gz
glibc-b25c5d66b27045e44e435dbc65b6213840d377f6.tar.xz
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')
-rw-r--r--posix/glob.c2
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);