]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c
MdeModulePkg/Bds: Check variable name even *if* OptionNumber is NULL
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 10 Oct 2017 08:57:38 +0000 (16:57 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Thu, 12 Oct 2017 02:00:48 +0000 (10:00 +0800)
commit5e6e2dcc380dcd841f6f979fea8c302c80a87ec3
treeae943e2ccad0d654ae0a80c6baf9382910d11aa1
parent618ef6f9bae14e1543d61993ab7ab8992063e4cc
MdeModulePkg/Bds: Check variable name even *if* OptionNumber is NULL

Current implementation skips to check whether the last four
characters are digits when the OptionNumber is NULL.
Even worse, it may incorrectly return FALSE when OptionNumber is
NULL.

The patch fixes it to always check the variable name even
OptionNumber is NULL.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c