summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c')
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index 14d549d4d6..a489288761 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
@@ -796,6 +796,7 @@ Returns:
RETURN_SUCCESS - The size of destination buffer and the size of scratch buffer are successull retrieved.
RETURN_INVALID_PARAMETER - The source data is corrupted
+ The GUID in InputSection does not match this instance guid.
--*/
{
@@ -804,6 +805,12 @@ Returns:
if (InputSection == NULL) {
return RETURN_INVALID_PARAMETER;
}
+
+ if (!CompareGuid (
+ &gTianoCustomDecompressGuid,
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ return RETURN_INVALID_PARAMETER;
+ }
//
// Get guid attribute of guid section.
//
@@ -846,7 +853,8 @@ Arguments:
Returns:
RETURN_SUCCESS - Decompression is successfull
- RETURN_INVALID_PARAMETER - The source data is corrupted
+ RETURN_INVALID_PARAMETER - The source data is corrupted, or
+ The GUID in InputSection does not match this instance guid.
--*/
{
@@ -854,7 +862,14 @@ Returns:
if (InputSection == NULL) {
return RETURN_INVALID_PARAMETER;
- }
+ }
+
+ if (!CompareGuid (
+ &gTianoCustomDecompressGuid,
+ &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ return RETURN_INVALID_PARAMETER;
+ }
+
//
// Set Authentication to Zero.
//