]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/UefiBootManagerLib: Initialize Handle before using it
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 6 Feb 2017 02:00:33 +0000 (10:00 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 8 Feb 2017 09:46:31 +0000 (17:46 +0800)
commit00e39b0939574d7c2ce5dbd14f0aa2c1297e42fe
tree1098d6870a901fb89cb9077e05f0164137671e47
parentcc20411062137e5d820a33db73d41f97dae74368
MdeModulePkg/UefiBootManagerLib: Initialize Handle before using it

BmExpandMediaDevicePath contains a bug that it uses the
uninitialized Handle.

Since the function is called when the Handle supports BlockIo
or SimpleFileSystem, when there is no SimpleFileSystem installed
on the Handle, BlockIo is *guaranteed* to be installed on the Handle.
The fix initializes the Handle by locating the BlockIo protocol
from the device path.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c