MdeModulePkg/UdfDxe: ASSERT for false positives of NULL ptr deref
This commit adds ASSERTs to address false positive reports of NULL pointer dereference issues raised from static analysis with regard to function ReadDirectoryEntry(). Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Paulo Alcantara <palcantara@suse.de> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1404,6 +1404,15 @@ InternalFindFile (
|
||||
|
||||
break;
|
||||
}
|
||||
//
|
||||
// After calling function ReadDirectoryEntry(), if 'FileIdentifierDesc' is
|
||||
// NULL, then the 'Status' must be EFI_OUT_OF_RESOURCES. Hence, if the code
|
||||
// reaches here, 'FileIdentifierDesc' must be not NULL.
|
||||
//
|
||||
// The ASSERT here is for addressing a false positive NULL pointer
|
||||
// dereference issue raised from static analysis.
|
||||
//
|
||||
ASSERT (FileIdentifierDesc != NULL);
|
||||
|
||||
if (FileIdentifierDesc->FileCharacteristics & PARENT_FILE) {
|
||||
//
|
||||
|
Reference in New Issue
Block a user