summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c4
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf1
-rw-r--r--IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h1
3 files changed, 4 insertions, 2 deletions
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
index dc5511e0c5..3a1888d073 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
@@ -584,13 +584,13 @@ UefiDecompressGetInfo (
return RETURN_INVALID_PARAMETER;
}
- CompressedSize = *(UINT32 *) Source;
+ CompressedSize = ReadUnaligned32 ((UINT32 *)Source);
if (SourceSize < (CompressedSize + 8)) {
return RETURN_INVALID_PARAMETER;
}
*ScratchSize = sizeof (SCRATCH_DATA);
- *DestinationSize = *((UINT32 *) Source + 1);
+ *DestinationSize = ReadUnaligned32 ((UINT32 *)Source + 1);
return RETURN_SUCCESS;
}
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
index 746d42c2ae..9cc71bcca4 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
@@ -41,6 +41,7 @@
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
+ BaseLib
DebugLib
BaseMemoryLib
ExtractGuidedSectionLib
diff --git a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
index a1eb9d587c..d2695fa469 100644
--- a/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
+++ b/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
@@ -19,6 +19,7 @@
#include <PiPei.h>
+#include <Library/BaseLib.h>
#include <Library/UefiDecompressLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>