UINT8 CompressionId;\r
UDF_FILE_INFO PreviousFile;\r
\r
+ ZeroMem ((VOID *)File, sizeof (UDF_FILE_INFO));\r
+\r
//\r
// Symlink files on UDF volumes do not contain so much data other than\r
// Path Components which resolves to real filenames, so it's OK to read in\r
break;\r
}\r
\r
+ //\r
+ // Check the content in the file info pointed by File.\r
+ //\r
+ if ((File->FileEntry == NULL) || (File->FileIdentifierDesc == NULL)) {\r
+ Status = EFI_VOLUME_CORRUPTED;\r
+ goto Error_Find_File;\r
+ }\r
+\r
if (CompareMem ((VOID *)&PreviousFile, (VOID *)Parent,\r
sizeof (UDF_FILE_INFO)) != 0) {\r
CleanupFileInformation (&PreviousFile);\r
//\r
FreePool (ReadFileInfo.FileData);\r
\r
+ //\r
+ // Check the content in the resolved file info.\r
+ //\r
+ if ((File->FileEntry == NULL) || (File->FileIdentifierDesc == NULL)) {\r
+ return EFI_VOLUME_CORRUPTED;\r
+ }\r
+\r
return EFI_SUCCESS;\r
\r
Error_Find_File:\r