In CreateMacPathFromUnixPath, return paramErr if unixPath is nil.

git-svn-id: svn://10.0.0.236/trunk@9763 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
wtc%netscape.com 1998-09-10 21:08:47 +00:00
parent f75908c03b
commit adfc66903c

View File

@ -1044,6 +1044,12 @@ static OSErr CreateMacPathFromUnixPath(const char *unixPath, char **macPath)
char *tgt;
OSErr err = noErr;
PR_ASSERT(unixPath != nil);
if (nil == unixPath) {
err = paramErr;
goto exit;
}
// If unixPath is a zero-length string, we copy ":" into
// macPath, so we need a minimum of two bytes to handle
// the case of ":".
@ -1612,6 +1618,12 @@ static OSErr CreateMacPathFromUnixPath(const char *unixPath, char **macPath)
char *tgt;
OSErr err = noErr;
PR_ASSERT(unixPath != nil);
if (nil == unixPath) {
err = paramErr;
goto exit;
}
// If unixPath is a zero-length string, we copy ":" into
// macPath, so we need a minimum of two bytes to handle
// the case of ":".