From 532691c8ba90e5022174503ab0781322c6f79cab Mon Sep 17 00:00:00 2001 From: jcarsey Date: Fri, 14 Oct 2011 19:21:13 +0000 Subject: ShellPkg: Add checking for memory allocation and pointer returns from functions. signed-off-by: jcarsey reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12540 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c') diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c index 9ab5d89..945002a 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c @@ -303,6 +303,9 @@ ConvertStringToGuid ( } TempCopy = NULL; TempCopy = StrnCatGrow(&TempCopy, NULL, StringGuid, 0); + if (TempCopy == NULL) { + return (EFI_OUT_OF_RESOURCES); + } Walker = TempCopy; TempSpot = StrStr(Walker, L"-"); if (TempSpot != NULL) { -- cgit v1.1