mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/FrameBufferBltLib: Fix copying of unaligned memory
Contributed-under: TianoCore Contribution Agreement 1.1 Reported-by: Christian Ehrhardt <ehrhardt@genua.de> Signed-off-by: Christian Ehrhardt <ehrhardt@genua.de> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Tested-by: Christian Ehrhardt <ehrhardt@genua.de>
This commit is contained in:
parent
5ae0723355
commit
0e58b55a46
|
@ -280,6 +280,7 @@ FrameBufferBltLibVideoFill (
|
|||
SizeInBytes = WidthInBytes * Height;
|
||||
if (SizeInBytes >= 8) {
|
||||
SetMem32 (Destination, SizeInBytes & ~3, (UINT32) WideFill);
|
||||
Destination += SizeInBytes & ~3;
|
||||
SizeInBytes &= 3;
|
||||
}
|
||||
if (SizeInBytes > 0) {
|
||||
|
@ -297,6 +298,7 @@ FrameBufferBltLibVideoFill (
|
|||
SizeInBytes = WidthInBytes;
|
||||
if (SizeInBytes >= 8) {
|
||||
SetMem64 (Destination, SizeInBytes & ~7, WideFill);
|
||||
Destination += SizeInBytes & ~7;
|
||||
SizeInBytes &= 7;
|
||||
}
|
||||
if (SizeInBytes > 0) {
|
||||
|
|
Loading…
Reference in New Issue