From 6bbcb406d58939d5c00db8aa74c3a20b86a676e4 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Fri, 26 May 2000 01:35:05 +0000 Subject: [PATCH] Bugzilla bug #39967: replace an assertion in _PR_MD_GETFILEINFO64 by proper error checking and failure return. Thanks to Bernd Mielke 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 --- mozilla/nsprpub/pr/src/md/windows/ntio.c | 5 ++++- mozilla/nsprpub/pr/src/md/windows/w95io.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/nsprpub/pr/src/md/windows/ntio.c b/mozilla/nsprpub/pr/src/md/windows/ntio.c index d353a4a5a43..7ec253dfc12 100644 --- a/mozilla/nsprpub/pr/src/md/windows/ntio.c +++ b/mozilla/nsprpub/pr/src/md/windows/ntio.c @@ -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; diff --git a/mozilla/nsprpub/pr/src/md/windows/w95io.c b/mozilla/nsprpub/pr/src/md/windows/w95io.c index d80736fe372..3832eb4b481 100644 --- a/mozilla/nsprpub/pr/src/md/windows/w95io.c +++ b/mozilla/nsprpub/pr/src/md/windows/w95io.c @@ -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;