]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add assert check to make sure new stack size larger than old stack size.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Sep 2008 09:11:12 +0000 (09:11 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Sep 2008 09:11:12 +0000 (09:11 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5952 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c

index 5d9226fc7ec376d187ef2fdb00f32e2ad12ffe45..49b3d368647dcd1e129358736449ee057f6bd0e5 100644 (file)
@@ -477,10 +477,8 @@ PeiDispatcher (
               // But if new stack is smaller than the size of old stack, we also reserve\r
               // the size of old stack at bottom of permenent memory.\r
               //\r
-              StackGap = 0;\r
-              if (Private->StackSize > OldPeiStackSize) {\r
-                StackGap = Private->StackSize - OldPeiStackSize;\r
-              }\r
+              ASSERT (Private->StackSize >= OldPeiStackSize);\r
+              StackGap = Private->StackSize - OldPeiStackSize;\r
 \r
               //\r
               // Update HandOffHob for new installed permenent memory\r