Revision: 13914
          http://edk2.svn.sourceforge.net/edk2/?rev=13914&view=rev
Author:   vanjeff
Date:     2012-11-02 02:25:17 +0000 (Fri, 02 Nov 2012)
Log Message:
-----------
Sync patches r13894 and r13895 from main trunk.
Fix memory out of band access in AsmFxSave() and AsmFxRestore(). 

Revision Links:
--------------
    http://edk2.svn.sourceforge.net/edk2/?rev=13894&view=rev
    http://edk2.svn.sourceforge.net/edk2/?rev=13895&view=rev

Modified Paths:
--------------
    
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
    
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
    branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxRestore.c
    branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxSave.c

Modified: 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
===================================================================
--- 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
     2012-11-02 00:58:15 UTC (rev 13913)
+++ 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxRestore.c
     2012-11-02 02:25:17 UTC (rev 13914)
@@ -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: 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
===================================================================
--- 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
        2012-11-02 00:58:15 UTC (rev 13913)
+++ 
branches/UDK2010.SR1/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X86FxSave.c
        2012-11-02 02:25:17 UTC (rev 13914)
@@ -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;
 }

Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxRestore.c
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxRestore.c  2012-11-02 
00:58:15 UTC (rev 13913)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxRestore.c  2012-11-02 
02:25:17 UTC (rev 13914)
@@ -1,7 +1,7 @@
 /** @file
   IA-32/x64 AsmFxRestore()
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 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
@@ -43,7 +43,7 @@
   //
   // Check the flag recorded by AsmFxSave()
   //
-  ASSERT (0xAA5555AA == *(UINT32 *) (&Buffer[sizeof (IA32_FX_BUFFER) - 4]));
+  ASSERT (0xAA5555AA == *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 
4]));
 
   InternalX86FxRestore (Buffer);
 }

Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxSave.c
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxSave.c     2012-11-02 
00:58:15 UTC (rev 13913)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/X86FxSave.c     2012-11-02 
02:25:17 UTC (rev 13914)
@@ -1,7 +1,7 @@
 /** @file
   IA-32/x64 AsmFxSave()
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 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
@@ -44,5 +44,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.


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to