From fe92f438ac860a09e57a2a6a37c1a1d8b6539321 Mon Sep 17 00:00:00 2001 From: lzeng14 Date: Fri, 11 May 2012 01:48:45 +0000 Subject: The code line where judges if offset exceed the FTW work space boundary, in some special situations where there are so many records, the offset may happen to be just equal to FtwWorkSpaceSize. And then FtwHead will be updated to be outside of work space wrongly, and cause the system to hang in this driver. Signed-off-by: Star Zeng Reviewed-by: Guo Dong git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13307 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c index dc110a226d..482753f62c 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c @@ -2,7 +2,7 @@ Internal generic functions to operate flash block. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
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 @@ -777,7 +777,7 @@ FtwGetLastWriteHeader ( // // If Offset exceed the FTW work space boudary, return error. // - if (Offset > FtwWorkSpaceSize) { + if (Offset >= FtwWorkSpaceSize) { *FtwWriteHeader = FtwHeader; return EFI_ABORTED; } -- cgit v1.2.3