summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e27ecde)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15260
6f19259b-4bc3-4df7-8a09-
765794883524
}\r
\r
CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, RootPath, 0);\r
}\r
\r
CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, RootPath, 0);\r
+ if (CorrectedPath == NULL) {\r
+ return SHELL_OUT_OF_RESOURCES;\r
+ }\r
if (CorrectedPath[StrLen(CorrectedPath)-1] != L'\\'\r
&&CorrectedPath[StrLen(CorrectedPath)-1] != L'/') {\r
CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, L"\\", 0);\r
if (CorrectedPath[StrLen(CorrectedPath)-1] != L'\\'\r
&&CorrectedPath[StrLen(CorrectedPath)-1] != L'/') {\r
CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, L"\\", 0);\r
ASSERT((FullPath == NULL && Size == 0) || (FullPath != NULL));\r
if (StrStr(PathName, L":") == NULL) {\r
StrnCatGrow(&FullPath, &Size, gEfiShellProtocol->GetCurDir(NULL), 0);\r
ASSERT((FullPath == NULL && Size == 0) || (FullPath != NULL));\r
if (StrStr(PathName, L":") == NULL) {\r
StrnCatGrow(&FullPath, &Size, gEfiShellProtocol->GetCurDir(NULL), 0);\r
+ if (FullPath == NULL) {\r
+ ShellCommandLineFreeVarList (Package);\r
+ return SHELL_OUT_OF_RESOURCES;\r
+ }\r
}\r
StrnCatGrow(&FullPath, &Size, PathName, 0);\r
}\r
StrnCatGrow(&FullPath, &Size, PathName, 0);\r
+ if (FullPath == NULL) {\r
+ ShellCommandLineFreeVarList (Package);\r
+ return SHELL_OUT_OF_RESOURCES;\r
+ }\r
+ \r
if (ShellIsDirectory(PathName) == EFI_SUCCESS) {\r
//\r
// is listing ends with a directory, then we list all files in that directory\r
if (ShellIsDirectory(PathName) == EFI_SUCCESS) {\r
//\r
// is listing ends with a directory, then we list all files in that directory\r