#include <Protocol/SecurityPolicy.h>\r
#include <Library/ExtractGuidedSectionLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
typedef struct {\r
Returns:\r
\r
EFI_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.\r
- EFI_INVALID_PARAMETER - The source data is corrupted\r
+ EFI_INVALID_PARAMETER - The source data is corrupted, or\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
+ if (!CompareGuid (\r
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
//\r
// Retrieve the size and attribute of the input section data.\r
//\r
\r
Returns:\r
\r
- EFI_SUCCESS - Decompression is successfull\r
- EFI_INVALID_PARAMETER - The source data is corrupted\r
+ RETURN_SUCCESS - Decompression is successfull\r
+ RETURN_INVALID_PARAMETER - The source data is corrupted, or\r
+ The GUID in InputSection does not match this instance guid.\r
\r
--*/\r
{\r
UINT32 OutputBufferSize;\r
VOID *DummyInterface;\r
\r
+ if (!CompareGuid (\r
+ &gEfiCrc32GuidedSectionExtractionProtocolGuid, \r
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
Crc32Checksum = 0;\r
//\r
// Points to the Crc32 section header\r