]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/Library/MpInitLib/MpLib.c
UefiCpuPkg/MpLib: fix potential overflow issue.
authorEric Dong <eric.dong@intel.com>
Mon, 21 Aug 2017 06:40:44 +0000 (14:40 +0800)
committerEric Dong <eric.dong@intel.com>
Mon, 28 Aug 2017 07:13:48 +0000 (15:13 +0800)
commit48cfb7c0f4a8ed01ce4883029724d4eb2724b48a
tree067dc58fa231cf395085ebbdc955055a785f2792
parent714c2603018a99a514c42c2b511c821f30ba9cdf
UefiCpuPkg/MpLib: fix potential overflow issue.

Current calculate timeout logic may have overflow if the input
timeout value too large. This patch fix this potential overflow
issue.

V2: Use local variable instead of call GetPerformanceCounterProperties
twice. Also correct some comments.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
UefiCpuPkg/Library/MpInitLib/MpLib.c