Check that result of print function is not NULL before using
@@ -201,6 +201,12 @@ DumpSupportCommand(
pPlatformSupportFileName = CatSPrint(pDumpUserPath, L"_" FORMAT_STR L".txt",
APPEND_TO_FILE_NAME);
+ if (NULL == pPlatformSupportFileName) {
+ ReturnCode = EFI_OUT_OF_RESOURCES;
+ PRINTER_SET_MSG(pPrinterCtx, ReturnCode, CLI_ERR_OUT_OF_MEMORY);
+ goto Finish;
+ }
+
pPlatformSupportFilenameAsciiLength = StrLen(pPlatformSupportFileName) + 1;
pPlatformSupportFilenameAsciiSize = pPlatformSupportFilenameAsciiLength * sizeof(CHAR8);
if(NULL == pPlatformSupportFileName || NULL == (pPlatformSupportFilenameAscii = AllocatePool(pPlatformSupportFilenameAsciiSize)))
