From b9ffeab7b0856db6409b53efbba51b8c336b7491 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Wed, 4 Nov 2015 01:56:29 +0000 Subject: ShellPkg UefiDpLib: Use correct string length for the input UnicodeBuffer Same as the beginning of function to use DP_GAUGE_STRING_LENGTH, but not DXE_PERFORMANCE_STRING_LENGTH. Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jaben Carsey git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18725 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiDpLib/DpUtilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiDpLib/DpUtilities.c b/ShellPkg/Library/UefiDpLib/DpUtilities.c index 5237459e5b..e9d8fb3adf 100644 --- a/ShellPkg/Library/UefiDpLib/DpUtilities.c +++ b/ShellPkg/Library/UefiDpLib/DpUtilities.c @@ -164,8 +164,8 @@ DpGetShortPdbFileName ( for (IndexA = StartIndex; IndexA < EndIndex; IndexA++) { UnicodeBuffer[IndexU] = (CHAR16) PdbFileName[IndexA]; IndexU++; - if (IndexU >= DXE_PERFORMANCE_STRING_LENGTH) { - UnicodeBuffer[DXE_PERFORMANCE_STRING_LENGTH] = 0; + if (IndexU >= DP_GAUGE_STRING_LENGTH) { + UnicodeBuffer[DP_GAUGE_STRING_LENGTH] = 0; break; } } -- cgit v1.2.3