]> git.proxmox.com Git - mirror_edk2.git/commit - ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
ShellPkg: BcfgDisplayDump(): enforce minimum size for Boot#### and co.
authorLaszlo Ersek <lersek@redhat.com>
Thu, 21 Jan 2016 18:40:09 +0000 (18:40 +0000)
committerlersek <lersek@Edk2>
Thu, 21 Jan 2016 18:40:09 +0000 (18:40 +0000)
commite5945ef78463a2a90631c91e9f8cff109fd20625
treeaf2910ae5677a8c26fcc11b84f377d76739c5ea6
parent8f2c09f8b2a8708db49e42bcac4cdfbccfa817d8
ShellPkg: BcfgDisplayDump(): enforce minimum size for Boot#### and co.

"3.1.1 Boot Manager Programming" in the UEFI 2.5 spec mandates that
Boot#### and similar options contain EFI_LOAD_OPTION structures. The
EFI_LOAD_OPTION structure encodes the fixed initial part of the payload,
and we can (and should) use it to enforce a minimum size for variable
contents.

This patch is meant as a safety improvement.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19710 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni