summaryrefslogtreecommitdiffstats
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-03-22 10:08:55 +0800
committerHao Wu <hao.a.wu@intel.com>2017-04-14 13:13:51 +0800
commit1860cb00c18c6f0c58336ea15a63889dabd31d15 (patch)
treec74d106d161f6de98e4862e5d5e617f1d2cdf235 /Nt32Pkg
parent89558f1653e1820f0f824d3299122100b0a6d82c (diff)
downloadedk2-1860cb00c18c6f0c58336ea15a63889dabd31d15.tar.gz
edk2-1860cb00c18c6f0c58336ea15a63889dabd31d15.tar.bz2
edk2-1860cb00c18c6f0c58336ea15a63889dabd31d15.zip
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>
Diffstat (limited to 'Nt32Pkg')
0 files changed, 0 insertions, 0 deletions