ShellPkg: Add checking for memory allocation and pointer returns from functions.
signed-off-by: jcarsey reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12542 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -163,8 +163,8 @@ ShellLevel2CommandsLibDestructor (
|
||||
@param[in] Path The unknown Path Value
|
||||
|
||||
@retval NULL A memory allocation failed
|
||||
@retval NULL a fully qualified path could not be discovered.
|
||||
@retval other pointer to a fuly qualified path.
|
||||
@retval NULL A fully qualified path could not be discovered.
|
||||
@retval other An allocated pointer to a fuly qualified path.
|
||||
**/
|
||||
CHAR16*
|
||||
EFIAPI
|
||||
@ -194,6 +194,10 @@ GetFullyQualifiedPath(
|
||||
|
||||
PathCleanUpDirectories(PathToReturn);
|
||||
|
||||
if (PathTpReturn == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (PathToReturn[StrLen(PathToReturn)-1] == L'*') {
|
||||
PathToReturn[StrLen(PathToReturn)-1] = CHAR_NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user