summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-01 23:21:43 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-01 23:21:43 +0000
commite69a06299978b99051fc078ac3bc46c77f0d5821 (patch)
tree8ebe5bb644bd85d55f61b1f3e674d65661b571c2 /IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib
parent7fd58cbc7e0eb861255ffd691d4ffacbaff94e89 (diff)
downloadedk2-platforms-e69a06299978b99051fc078ac3bc46c77f0d5821.tar.xz
Use ReadUnaligned32() instead of CopyMem()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5605 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib')
-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>