mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-29 08:34:07 +02:00
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;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompressedSize = *(UINT32 *) Source;
|
CompressedSize = ReadUnaligned32 ((UINT32 *)Source);
|
||||||
if (SourceSize < (CompressedSize + 8)) {
|
if (SourceSize < (CompressedSize + 8)) {
|
||||||
return RETURN_INVALID_PARAMETER;
|
return RETURN_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ScratchSize = sizeof (SCRATCH_DATA);
|
*ScratchSize = sizeof (SCRATCH_DATA);
|
||||||
*DestinationSize = *((UINT32 *) Source + 1);
|
*DestinationSize = ReadUnaligned32 ((UINT32 *)Source + 1);
|
||||||
|
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
BaseLib
|
||||||
DebugLib
|
DebugLib
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
ExtractGuidedSectionLib
|
ExtractGuidedSectionLib
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <PiPei.h>
|
#include <PiPei.h>
|
||||||
|
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/UefiDecompressLib.h>
|
#include <Library/UefiDecompressLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user