public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg:Tcg2Smm: Fix compile issue
@ 2018-02-06 14:28 Zhang, Chao B
  2018-02-07  0:42 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Chao B @ 2018-02-06 14:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Dandan Bi, Chao Zhang

Update Tcg2Smm _PRS patching logic to fix compile issue

Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
 SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index e3938cb..6eb62ae 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -539,10 +539,11 @@ UpdatePossibleResource (
   *(DataPtr + 1) = 0;
 
   //
-  // 5. Jump over whole ResourceTemplate. Stuff rest bytes to NOOP
+  // 5. Jump over new ResourceTemplate. Stuff rest bytes to NOOP
   //
-  for (DataPtr += 2; DataPtr < DataEndPtr; DataPtr++) {
-    *DataPtr = AML_NOOP_OP;
+  DataPtr += 2;
+  if (DataPtr < DataEndPtr) {
+    SetMem(DataPtr, (UINTN)(DataEndPtr - 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-07  0:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 14:28 [PATCH] SecurityPkg:Tcg2Smm: Fix compile issue Zhang, Chao B
2018-02-07  0:42 ` Gao, Liming

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