1999-07-07  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/posix/getcwd.c: When resizing buffer make sure new size
	is large enough.
This commit is contained in:
Ulrich Drepper 1999-07-07 12:30:38 +00:00
parent d7807bfa57
commit c9cddf51e7
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
1999-07-07 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/getcwd.c: When resizing buffer make sure new size
is large enough.
1999-07-07 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/getpt.c: Check that /dev/pts is mounted.

View File

@ -135,6 +135,10 @@ extern void free ();
# define memmove memcpy
#endif /* Not ANSI_STRING. */
#ifndef MAX
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
#ifdef _LIBC
# ifndef mempcpy
# define mempcpy __mempcpy
@ -368,7 +372,7 @@ __getcwd (buf, size)
{
char *tmp;
size *= 2;
size = 2 * MAX (size, namlen);
tmp = realloc (path, size);
if (tmp == NULL)
{