From: "Zhang, Chao B" <chao.b.zhang@intel.com>
To: edk2-devel@lists.01.org
Cc: Wu Hao <hao.a.wu@intel.com>, Chao Zhang <chao.b.zhang@intel.com>
Subject: [PATCH] SecurityPkg: Tcg2Smm: Fix type casting issue
Date: Thu, 8 Feb 2018 14:24:42 +0800 [thread overview]
Message-ID: <20180208062442.19060-1-chao.b.zhang@intel.com> (raw)
Fix type casting issue when calculating pointers offset
Cc: Wu Hao <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index 6eb62ae..c3cee83 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -543,7 +543,7 @@ UpdatePossibleResource (
//
DataPtr += 2;
if (DataPtr < DataEndPtr) {
- SetMem(DataPtr, (UINTN)(DataEndPtr - DataPtr), AML_NOOP_OP);
+ SetMem(DataPtr, (UINTN)DataEndPtr - (UINTN)DataPtr, AML_NOOP_OP);
}
return EFI_SUCCESS;
--
1.9.5.msysgit.1
next reply other threads:[~2018-02-08 6:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 6:24 Zhang, Chao B [this message]
2018-02-08 7:54 ` [PATCH] SecurityPkg: Tcg2Smm: Fix type casting issue Wu, Hao A
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=20180208062442.19060-1-chao.b.zhang@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