]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
IntelFrameworkPkg FrameworkUefiLib: Fix wrong DestMax passed to StrCpyS()
[mirror_edk2.git] / IntelFrameworkPkg / Library / FrameworkUefiLib / UefiLibPrint.c
index 2570ff4db952d81a0c26cf4388093921cbdab0d9..f0dcf9fb25f4fe5165f58c1998c8f4ea64766d8d 100644 (file)
@@ -763,7 +763,7 @@ CatVSPrint (
   }\r
 \r
   if (String != NULL) {\r
-    StrCpyS(BufferToReturn, SizeRequired, String);\r
+    StrCpyS(BufferToReturn, SizeRequired / sizeof(CHAR16), String);\r
   }\r
 \r
   UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker);\r