Use ReadUnaligned32() instead of CopyMem()

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5605 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2008-08-01 23:21:43 +00:00
parent 7fd58cbc7e
commit e69a062999
3 changed files with 4 additions and 2 deletions

View File

@ -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;
}

View File

@ -41,6 +41,7 @@
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
[LibraryClasses]
BaseLib
DebugLib
BaseMemoryLib
ExtractGuidedSectionLib

View File

@ -19,6 +19,7 @@
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/UefiDecompressLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>