]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
ShellPkg: Add checking for memory allocation and pointer returns from functions.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / UefiShellDebug1CommandsLib.c
index 9ab5d89748a82bd62aea26a355fa8fc2b40f39cd..945002a2ea8734a786d00d94a8bdfbe9ccaec7d5 100644 (file)
@@ -303,6 +303,9 @@ ConvertStringToGuid (
   } \r
   TempCopy = NULL;\r
   TempCopy = StrnCatGrow(&TempCopy, NULL, StringGuid, 0);\r
+  if (TempCopy == NULL) {\r
+    return (EFI_OUT_OF_RESOURCES);\r
+  }\r
   Walker   = TempCopy;\r
   TempSpot = StrStr(Walker, L"-");\r
   if (TempSpot != NULL) {\r