@param[in, out] DestPathPointer A pointer to the callee allocated final path.\r
@param[in] Cwd A pointer to the current working directory.\r
\r
- @retval EFI_INVALID_PARAMETR The DestDir could not be resolved to a location.\r
- @retval EFI_INVALID_PARAMETR The DestDir could be resolved to more than 1 location.\r
- @retval EFI_SUCCESS The operation was sucessful.\r
+ @retval SHELL_INVALID_PARAMETER The DestDir could not be resolved to a location.\r
+ @retval SHELL_INVALID_PARAMETER The DestDir could be resolved to more than 1 location.\r
+ @retval SHELL_INVALID_PARAMETER Cwd is required and is NULL.\r
+ @retval SHELL_SUCCESS The operation was sucessful.\r
**/\r
SHELL_STATUS\r
EFIAPI\r
DestPath = NULL;\r
\r
if (StrStr(DestDir, L"\\") == DestDir) {\r
+ if (Cwd == NULL) {\r
+ return SHELL_INVALID_PARAMETER;\r
+ }\r
DestPath = AllocateZeroPool(StrSize(Cwd));\r
if (DestPath == NULL) {\r
return (SHELL_OUT_OF_RESOURCES);\r
// Not existing... must be renaming\r
//\r
if ((TempLocation = StrStr(DestDir, L":")) == NULL) {\r
+ if (Cwd == NULL) {\r
+ ShellCloseFileMetaArg(&DestList);\r
+ return (SHELL_INVALID_PARAMETER);\r
+ }\r
NewSize = StrSize(Cwd);\r
NewSize += StrSize(DestDir);\r
DestPath = AllocateZeroPool(NewSize);\r