mirror of https://github.com/acidanthera/audk.git
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:
parent
7fd58cbc7e
commit
e69a062999
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
BaseMemoryLib
|
||||
ExtractGuidedSectionLib
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <PiPei.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/UefiDecompressLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
|
Loading…
Reference in New Issue