@param SectionAttribute The attribute of the input guided section.\r
\r
@retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and \r
- the attribute of the input section are successull retrieved.\r
+ the attribute of the input section are successfully retrieved.\r
@retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid.\r
\r
**/\r
//\r
*SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes;\r
*ScratchBufferSize = 0;\r
- *OutputBufferSize = SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset;\r
+ *OutputBufferSize = SECTION2_SIZE (InputSection) - sizeof(RSA_2048_SHA_256_SECTION2_HEADER);\r
} else {\r
//\r
// Check whether the input guid section is recognized.\r
//\r
*SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes;\r
*ScratchBufferSize = 0;\r
- *OutputBufferSize = SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset;\r
+ *OutputBufferSize = SECTION_SIZE (InputSection) - sizeof(RSA_2048_SHA_256_SECTION_HEADER);\r
}\r
\r
return EFI_SUCCESS;\r