From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Christian Ehrhardt <ehrhardt@genua.de>, Star Zeng <star.zeng@intel.com>
Subject: [PATCH 3/3] MdeModulePkg/FrameBufferBltLib: Fix copying of unaligned memory
Date: Mon, 15 Jan 2018 11:46:12 +0800 [thread overview]
Message-ID: <20180115034612.381104-4-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20180115034612.381104-1-ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Christian Ehrhardt <ehrhardt@genua.de>
Signed-off-by: Christian Ehrhardt <ehrhardt@genua.de>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
---
MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 ++
1 file changed, 2 insertions(+)
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) {
--
2.15.1.windows.2
next prev parent reply other threads:[~2018-01-15 3:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 3:46 [PATCH 0/3] Fix two bugs in FrameBufferBltLib Ruiyu Ni
2018-01-15 3:46 ` [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Use UINT32 type for internal data Ruiyu Ni
[not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103B9FC6E6@shsmsx102.ccr.corp.intel.com>
2018-01-16 5:24 ` Ni, Ruiyu
2018-01-15 3:46 ` [PATCH 2/3] MdeModulePkg/FrameBufferBltLib: Fix a bug causing display corrupted Ruiyu Ni
2018-01-16 5:18 ` Zeng, Star
2018-01-15 3:46 ` Ruiyu Ni [this message]
2018-01-16 5:18 ` [PATCH 3/3] MdeModulePkg/FrameBufferBltLib: Fix copying of unaligned memory Zeng, Star
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115034612.381104-4-ruiyu.ni@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox