summaryrefslogtreecommitdiff
path: root/IntelFrameworkPkg/Library
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-08-05 02:55:05 +0000
committerhwu1225 <hwu1225@Edk2>2015-08-05 02:55:05 +0000
commitdba275689353e49617f60ebe85618f17e1774bfb (patch)
tree9ac4edf9cefc21081a5c803e2976c387734157d4 /IntelFrameworkPkg/Library
parentcb21fcbb655fece5986bc1e2514513f1ba72d3ff (diff)
downloadedk2-platforms-dba275689353e49617f60ebe85618f17e1774bfb.tar.xz
IntelFrameworkPkg FrameworkUefiLib: Fix wrong DestMax passed to StrCpyS()
The second parameter 'DestMax' of StrCpyS() should be the number of unicode characters, not the size in bytes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18159 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkPkg/Library')
-rw-r--r--IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
index 2570ff4db9..f0dcf9fb25 100644
--- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
+++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
@@ -763,7 +763,7 @@ CatVSPrint (
}
if (String != NULL) {
- StrCpyS(BufferToReturn, SizeRequired, String);
+ StrCpyS(BufferToReturn, SizeRequired / sizeof(CHAR16), String);
}
UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker);