Corrently null-terminate the path being passed to the opendir() calls,

malloc() does is not defined to return a zeroed buffer leading to
"strange" problems.

Submitted by: Karl Denninger <karl@mcs.com>, PR#1826
This commit is contained in:
Peter Wemm 1996-10-17 00:40:04 +00:00
parent 138e4d769c
commit 0d4453d303

View File

@ -154,6 +154,7 @@ getcwd(pt, size)
/* Add trailing slash for next directory. */
*bup++ = '/';
*bup = '\0';
/*
* If it's a mount point, have to stat each element because