]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/UefiFileHandleLib: Fix potential NULL dereference
authorMarvin Haeuser <mhaeuser@outlook.de>
Sun, 20 Oct 2019 12:08:31 +0000 (20:08 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 4 Nov 2019 00:52:07 +0000 (08:52 +0800)
commit1009b59b6525c16724fe2684c344a6359af28b55
treea9cde1b0734ab336918116935c74e9831b0ddb92
parent787c4baace1c0c49fa1628990402be8997294d17
MdePkg/UefiFileHandleLib: Fix potential NULL dereference

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2293

Move the NULL check in FileHandleGetInfo() to directly after the
allocation to prevent potential NULL dereferences.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c