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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user