IN UDF_SHORT_ALLOCATION_DESCRIPTOR *ShortAd\r
)\r
{\r
+ ASSERT (PartitionDesc != NULL);\r
+\r
return (UINT64)PartitionDesc->PartitionStartingLocation +\r
ShortAd->ExtentPosition;\r
}\r
*NewFileIdentifierDesc =\r
(UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool (\r
(UINTN) GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);\r
+\r
+ ASSERT (*NewFileIdentifierDesc != NULL);\r
}\r
\r
//\r
)\r
{\r
*NewFileEntry = AllocateCopyPool (Volume->FileEntrySize, FileEntry);\r
+\r
+ ASSERT (*NewFileEntry != NULL);\r
}\r
\r
//\r
if (EFI_ERROR (Status)) {\r
goto Error_Get_Aed;\r
}\r
+ ASSERT (Data != NULL);\r
\r
AdOffset = 0;\r
continue;\r
CHAR16 FoundFileName[UDF_FILENAME_LENGTH];\r
VOID *CompareFileEntry;\r
\r
+ //\r
+ // Check if both Parent->FileIdentifierDesc and Icb are NULL.\r
+ //\r
+ if ((Parent->FileIdentifierDesc == NULL) && (Icb == NULL)) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
//\r
// Check if parent file is really directory.\r
//\r
// FE/EFE and FID descriptors.\r
//\r
if (StrCmp (FileName, L".") == 0) {\r
+ if (Parent->FileIdentifierDesc == NULL) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
DuplicateFe (BlockIo, Volume, Parent->FileEntry, &File->FileEntry);\r
DuplicateFid (Parent->FileIdentifierDesc, &File->FileIdentifierDesc);\r
\r