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 1996-10-17 00:40:04 +00:00
parent 9c00f7f8e2
commit 1f0a73e693

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