public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg: Tcg2Smm: Fix type casting issue
@ 2018-02-08  6:24 Zhang, Chao B
  2018-02-08  7:54 ` Wu, Hao A
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Chao B @ 2018-02-08  6:24 UTC (permalink / raw)
  To: edk2-devel; +Cc: Wu Hao, Chao Zhang

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-08  7:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-08  6:24 [PATCH] SecurityPkg: Tcg2Smm: Fix type casting issue Zhang, Chao B
2018-02-08  7:54 ` Wu, Hao A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox