Bugzilla bug #39967: replace an assertion in _PR_MD_GETFILEINFO64 by

proper error checking and failure return.  Thanks to Bernd Mielke
<mielke@licel.com> for the bug report.
Modified files: ntio.c, w95io.c


git-svn-id: svn://10.0.0.236/trunk@70897 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%netscape.com
2000-05-26 01:35:05 +00:00
parent d4c1a32df2
commit 6bbcb406d5
2 changed files with 8 additions and 2 deletions

View File

@@ -3016,7 +3016,10 @@ _PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info)
}
len = GetFullPathName(fn, sizeof(pathbuf), pathbuf,
&filePart);
PR_ASSERT(0 != len);
if (0 == len) {
_PR_MD_MAP_OPENDIR_ERROR(GetLastError());
return -1;
}
if (len > sizeof(pathbuf)) {
PR_SetError(PR_NAME_TOO_LONG_ERROR, 0);
return -1;

View File

@@ -773,7 +773,10 @@ _PR_MD_GETFILEINFO64(const char *fn, PRFileInfo64 *info)
}
len = GetFullPathName(fn, sizeof(pathbuf), pathbuf,
&filePart);
PR_ASSERT(0 != len);
if (0 == len) {
_PR_MD_MAP_OPENDIR_ERROR(GetLastError());
return -1;
}
if (len > sizeof(pathbuf)) {
PR_SetError(PR_NAME_TOO_LONG_ERROR, 0);
return -1;