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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user