Revision: 13895
          http://edk2.svn.sourceforge.net/edk2/?rev=13895&view=rev
Author:   lgao4
Date:     2012-10-30 08:36:02 +0000 (Tue, 30 Oct 2012)
Log Message:
-----------
Fix memory out of band access in AsmFxSave() and AsmFxRestore(). 

Signed-off-by: Liming Gao <[email protected]>
Reviewed-by: Feng Tian <[email protected]>

Modified Paths:
--------------
    
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
    
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c

Modified: 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
===================================================================
--- 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
       2012-10-30 08:35:08 UTC (rev 13894)
+++ 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
       2012-10-30 08:36:02 UTC (rev 13895)
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials                          
 are licensed and made available under the terms and conditions of the BSD 
License         
 which accompanies this distribution.  The full text of the license may be 
found at        
@@ -48,7 +48,7 @@
   //
   // Check the flag recorded by AsmFxSave()
   //
-  ASSERT (*(UINT32 *) (&Buffer[sizeof (IA32_FX_BUFFER) - 4]) == 0xAA5555AA);
+  ASSERT (*(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) == 
0xAA5555AA);
 
   InternalX86FxRestore (Buffer);
 }

Modified: 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
===================================================================
--- 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
  2012-10-30 08:35:08 UTC (rev 13894)
+++ 
trunk/edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
  2012-10-30 08:36:02 UTC (rev 13895)
@@ -1,6 +1,6 @@
 /*++
 
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials                          
 are licensed and made available under the terms and conditions of the BSD 
License         
 which accompanies this distribution.  The full text of the license may be 
found at        
@@ -49,5 +49,5 @@
   //
   // Mark one flag at end of Buffer, it will be check by AsmFxRestor()
   //
-  *(UINT32 *) (&Buffer[sizeof (IA32_FX_BUFFER) - 4]) = 0xAA5555AA;
+  *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) = 0xAA5555AA;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to