]> git.proxmox.com Git - mirror_edk2.git/commit - PerformancePkg/Dp_App/DpUtilities.c
PerformancePkg Dp_App: Fix ASSERT in GetNameFromHandle
authorHao Wu <hao.a.wu@intel.com>
Mon, 13 Jul 2015 01:24:44 +0000 (01:24 +0000)
committerhwu1225 <hwu1225@Edk2>
Mon, 13 Jul 2015 01:24:44 +0000 (01:24 +0000)
commit6bc4e42f9d043bcda03f03a74e6dec0aa5c0ead1
treeee069945a131dfccef7fd7db1e97f17b179d0b9d
parentc1fd37cd6bcb98143bd4a44f427735a748058ad8
PerformancePkg Dp_App: Fix ASSERT in GetNameFromHandle

This commit will resolve the issue brought by r17745.

StrCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, StringPtr);

The above using of StrCpyS will cause ASSERT if StringPtr is longer than
mGaugeString. Therefore, StrnCpyS is used here to resolve the issue.

Similar scenario is for:
StrCpyS (mGaugeString, DP_GAUGE_STRING_LENGTH + 1, NameString); (twice)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17935 6f19259b-4bc3-4df7-8a09-765794883524
PerformancePkg/Dp_App/DpUtilities.c