diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c index 6bdc39f08b..b153d2fe45 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.c @@ -226,6 +226,10 @@ VerifyIntermediateDirectories ( PathCopy = StrnCatGrow(&PathCopy, NULL, Path, 0);
FileHandle = NULL;
+ if (PathCopy == NULL) {
+ return (EFI_OUT_OF_RESOURCES);
+ }
+
for (TempSpot = &PathCopy[StrLen(PathCopy)-1] ; *TempSpot != CHAR_NULL && *TempSpot != L'\\' ; TempSpot = &PathCopy[StrLen(PathCopy)-1]){
*TempSpot = CHAR_NULL;
}
|