diff --git a/mozilla/nsprpub/pr/src/md/mac/macio.c b/mozilla/nsprpub/pr/src/md/mac/macio.c index f0e393bc14b..ae5aa2ffd3e 100644 --- a/mozilla/nsprpub/pr/src/md/mac/macio.c +++ b/mozilla/nsprpub/pr/src/md/mac/macio.c @@ -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 ":".