mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-09 13:52:01 -04:00
Use constant offsets instead of 1-byte arrays
This commit is contained in:
parent
fae9d6681d
commit
d9af12b567
2 changed files with 10 additions and 6 deletions
|
@ -753,9 +753,11 @@ typedef struct CPD_EXT_SIGNED_PACKAGE_INFO_MODULE_ {
|
|||
UINT8 HashAlgorithm;
|
||||
UINT16 HashSize;
|
||||
UINT32 MetadataSize;
|
||||
UINT8 MetadataHash[1]; // Can be 32 or 48 bit
|
||||
// UINT8 MetadataHash[]; with the actual hash size is 32 or 48 bytes
|
||||
} CPD_EXT_SIGNED_PACKAGE_INFO_MODULE;
|
||||
|
||||
static const size_t CpdExtSignedPkgMetadataHashOffset = sizeof(CPD_EXT_SIGNED_PACKAGE_INFO_MODULE);
|
||||
|
||||
typedef struct CPD_EXT_SIGNED_PACKAGE_INFO_ {
|
||||
UINT32 ExtensionType;
|
||||
UINT32 ExtensionLength;
|
||||
|
@ -774,9 +776,11 @@ typedef struct CPD_EXT_MODULE_ATTRIBUTES_ {
|
|||
UINT32 UncompressedSize;
|
||||
UINT32 CompressedSize;
|
||||
UINT32 GlobalModuleId;
|
||||
UINT8 ImageHash[1]; // The actual hash size is 32 or 48 bytes
|
||||
// UINT8 ImageHash[]; with the actual hash size is 32 or 48 bytes
|
||||
} CPD_EXT_MODULE_ATTRIBUTES;
|
||||
|
||||
static const size_t CpdExtModuleImageHashOffset = sizeof(CPD_EXT_MODULE_ATTRIBUTES);
|
||||
|
||||
#define CPD_EXT_MODULE_COMPRESSION_TYPE_UNCOMPRESSED 0
|
||||
#define CPD_EXT_MODULE_COMPRESSION_TYPE_HUFFMAN 1
|
||||
#define CPD_EXT_MODULE_COMPRESSION_TYPE_LZMA 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue