* path.cc (getcwd): Allow NULL first argument.
This commit is contained in:
parent
b3fa795ab9
commit
19639f4139
|
@ -1,3 +1,7 @@
|
|||
Fri Oct 5 11:05:32 2001 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* path.cc (getcwd): Allow NULL first argument.
|
||||
|
||||
Fri Oct 5 00:31:35 2001 Christopher Faylor <cgf@cygnus.com>
|
||||
|
||||
* heap.h (inheap): Check for NULL.
|
||||
|
|
|
@ -3011,7 +3011,7 @@ getcwd (char *buf, size_t ulen)
|
|||
char* res = NULL;
|
||||
if (ulen == 0)
|
||||
set_errno (EINVAL);
|
||||
else if (!__check_null_invalid_struct_errno (buf, ulen))
|
||||
else if (buf == NULL || !__check_null_invalid_struct_errno (buf, ulen))
|
||||
res = cygheap->cwd.get (buf, 1, 1, ulen);
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue