audk/MdeModulePkg/Core/Dxe/Misc
Hao Wu 1860cb00c1 MdeModulePkg/DxeCore: Add ASSERT to ensure no subtract underflow
For function SplitRecord() in file PropertiesTable.c, there is a
potential subtract underflow case for line:

  return TotalNewRecordCount - 1;

However, such case will not happen since the logic in function
SplitTable() ensure that when calling SplitRecord(), the variable
'TotalNewRecordCount' will not be zero when performing the subtraction.
It will be handled in the previous if statement:

  if (MaxSplitRecordCount == 0) {
    CopyMem (NewRecord, OldRecord, DescriptorSize);
    return 0;
  }

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2017-04-14 13:13:51 +08:00
..
DebugImageInfo.c MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
InstallConfigurationTable.c Update the comments of InstallConfigurationTable to follow UEFI Spec. 2011-05-31 03:15:58 +00:00
MemoryAttributesTable.c MdeModulePkg/DxeCore: switch to MdePkg allocation granularity macros 2017-03-06 11:29:20 +01:00
MemoryProtection.c MdeModulePkg/MemoryProtection: Fix coding style issue 2017-03-28 15:01:52 +08:00
PropertiesTable.c MdeModulePkg/DxeCore: Add ASSERT to ensure no subtract underflow 2017-04-14 13:13:51 +08:00
SetWatchdogTimer.c Update the copyright notice format 2010-04-24 09:49:11 +00:00
Stall.c MdeModulePkg/Stall: Refine to compare 2 values with the same type 2017-01-12 21:26:27 +08:00