| version 1.24, 2000/01/22 22:19:10 |
version 1.24.4.2, 2003/08/05 09:31:58 |
|
|
| * Save the last component name and get the full pathname of |
* Save the last component name and get the full pathname of |
| * the current directory. |
* the current directory. |
| */ |
*/ |
| (void)strncpy(wbuf, p, (sizeof(wbuf) - 1)); |
(void)strlcpy(wbuf, p, sizeof(wbuf)); |
| |
|
| /* |
/* |
| * Call the inernal internal version of getcwd which |
* Call the inernal internal version of getcwd which |
|
|
| rootd = 0; |
rootd = 0; |
| |
|
| if (*wbuf) { |
if (*wbuf) { |
| if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) { |
if (strlen(resolved) + strlen(wbuf) + (rootd ? 0 : 1) + 1 > |
| |
MAXPATHLEN) { |
| errno = ENAMETOOLONG; |
errno = ENAMETOOLONG; |
| goto err1; |
goto err1; |
| } |
} |