Ext4Pkg: Add missing exit Status in Ext4OpenDirent

Missing EFI_OUT_OF_RESOURCES exit status on failed Ext4CreateDentry
leads to NULL-pointer dereference in Ext4GetFileInfo (passing NULL
buffer in Ext4ReadDir)

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
Savva Mitrofanov 2022-11-30 18:44:32 +06:00
parent b4077c6f4f
commit 504558b4ef
No known key found for this signature in database
GPG Key ID: 774924031750BF64
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,8 @@ Ext4OpenDirent (
} else {
File->Dentry = Ext4CreateDentry (FileName, Directory->Dentry);
if (!File->Dentry) {
if (File->Dentry == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
}