summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/FrameBufferBltLib
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-01-15 11:44:38 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-01-16 13:26:56 +0800
commit0e58b55a46b7e3249306a9371124708c80b13726 (patch)
tree9a133b3314b7cc90c1f5cf82b4c60d2459f36c40 /MdeModulePkg/Library/FrameBufferBltLib
parent5ae0723355962166cce0bec2a5453e5c70ffb40e (diff)
downloadedk2-0e58b55a46b7e3249306a9371124708c80b13726.tar.gz
edk2-0e58b55a46b7e3249306a9371124708c80b13726.tar.bz2
edk2-0e58b55a46b7e3249306a9371124708c80b13726.zip
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>
Diffstat (limited to 'MdeModulePkg/Library/FrameBufferBltLib')
-rw-r--r--MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
index c88469859b..78dc0c0b51 100644
--- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -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) {