1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* 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)).
This commit is contained in:
Roland McGrath
1995-08-07 21:45:04 +00:00
parent 99a9e88e55
commit b25c5d66b2
4 changed files with 17 additions and 8 deletions

View File

@@ -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);