diff options
author | Liming Gao <liming.gao@intel.com> | 2013-08-23 02:18:16 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-08-23 02:18:16 +0000 |
commit | 4afd3d042215afe68d00b9ab8c32f063a3a1c03f (patch) | |
tree | b5190bd11547ac22fe35eeceee85ef42bfe6eea5 /BaseTools/Source/Python/GenFds/Fd.py | |
parent | a365eed476687881ce0ed49af7d483fd3cb0c491 (diff) | |
download | edk2-platforms-4afd3d042215afe68d00b9ab8c32f063a3a1c03f.tar.xz |
Sync BaseTool trunk (version r2599) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Heshen Chen <chen.heshen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/Fd.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/Fd.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/Fd.py b/BaseTools/Source/Python/GenFds/Fd.py index aa4d2e8262..3716549cba 100644 --- a/BaseTools/Source/Python/GenFds/Fd.py +++ b/BaseTools/Source/Python/GenFds/Fd.py @@ -113,10 +113,15 @@ class FD(FDClassObject): PreviousRegionStart = RegionObj.Offset
PreviousRegionSize = RegionObj.Size
#
+ # Verify current region fits within allocated FD section Size
+ #
+ if PreviousRegionStart + PreviousRegionSize > self.Size:
+ EdkLogger.error("GenFds", GENFDS_ERROR,
+ 'FD %s size too small to fit region with offset 0x%X and size 0x%X'
+ % (self.FdUiName, PreviousRegionStart, PreviousRegionSize))
+ #
# Call each region's AddToBuffer function
#
- if PreviousRegionSize > self.Size:
- EdkLogger.error("GenFds", GENFDS_ERROR, 'FD %s size too small' % self.FdUiName)
GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
#
|