diff options
author | Yi Li <yi1.li@intel.com> | 2023-12-19 11:17:35 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-19 06:47:46 +0000 |
commit | 0223bdd4e40975c427616761fb13c9454461b64d (patch) | |
tree | 5f9fe1081c546d21f6e0a56b00c2f4fc1a8b3510 /FmpDevicePkg/PrivateInclude | |
parent | 00bf6890a9c63692215d690b3e00454dbe21b71c (diff) | |
download | edk2-0223bdd4e40975c427616761fb13c9454461b64d.tar.gz edk2-0223bdd4e40975c427616761fb13c9454461b64d.tar.bz2 edk2-0223bdd4e40975c427616761fb13c9454461b64d.zip |
FmpDevicePkg: Add DECLARE_LENGTH opcode of dependency expression
To avoid messy parsing of the Depex section of a Capsule, it would
be a lot easier for everyone involved if we preceded the Capsule Depex
Section with a length declaration. It provides simple bounds checking
to avoid having to parse the op-codes, but in the case of a malformed
depex being parsed, avoid other issues which can be messy.
REF: UEFI spec 2.10 Table 23.4
Signed-off-by: Yi Li <yi1.li@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'FmpDevicePkg/PrivateInclude')
-rw-r--r-- | FmpDevicePkg/PrivateInclude/FmpLastAttemptStatus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/FmpDevicePkg/PrivateInclude/FmpLastAttemptStatus.h b/FmpDevicePkg/PrivateInclude/FmpLastAttemptStatus.h index 39a55dd2c6..aaa3334909 100644 --- a/FmpDevicePkg/PrivateInclude/FmpLastAttemptStatus.h +++ b/FmpDevicePkg/PrivateInclude/FmpLastAttemptStatus.h @@ -66,6 +66,9 @@ enum LAST_ATTEMPT_STATUS_EXPANDED_ERROR_LIST { LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_FMP_NOT_FOUND,
LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_PUSH_FAILURE,
LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_POP_FAILURE,
+ LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_NOT_FIRST_OPCODE,
+ LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_BEYOND_DEPEX,
+ LAST_ATTEMPT_STATUS_DEPENDENCY_LIB_ERROR_DECLARE_LENGTH_INCORRECT,
///
/// Last attempt status codes used in FmpDependencyCheckLib
|