]> git.proxmox.com Git - mirror_edk2.git/commit - IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
IntelFrameworkModulePkg GenericBdsLib: Do not assume perf entry count has no change
authorStar Zeng <star.zeng@intel.com>
Wed, 30 Sep 2015 04:30:34 +0000 (04:30 +0000)
committerlzeng14 <lzeng14@Edk2>
Wed, 30 Sep 2015 04:30:34 +0000 (04:30 +0000)
commit201d2d21bdc88f85d85f30cd92d6d00b7e25301c
tree324e7bb45f36cee8bcdc0f3f8b685e4d3cfae7a4
parent2f931dda52dc6e20643c0842acf18c9f0b5a0097
IntelFrameworkModulePkg GenericBdsLib: Do not assume perf entry count has no change

Current implementation assumes the performance entry count has no change from
multiple GetPerformanceMeasurement() while loops, it may cause the allocated buffer
for PerfEntriesAsDxeHandle at the first loop to be overflowed if the following loop has
the count changed.

This patch is also to sync the change at
commit R18417 "MdeModulePkg: Fix a performance data buffer overrun issue".

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18562 6f19259b-4bc3-4df7-8a09-765794883524
IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c