Revision: 18159
http://sourceforge.net/p/edk2/code/18159
Author: hwu1225
Date: 2015-08-05 02:55:05 +0000 (Wed, 05 Aug 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Modified Paths:
--------------
trunk/edk2/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
Modified: trunk/edk2/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
===================================================================
--- trunk/edk2/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
2015-08-05 02:28:49 UTC (rev 18158)
+++ trunk/edk2/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
2015-08-05 02:55:05 UTC (rev 18159)
@@ -763,7 +763,7 @@
}
if (String != NULL) {
- StrCpyS(BufferToReturn, SizeRequired, String);
+ StrCpyS(BufferToReturn, SizeRequired / sizeof(CHAR16), String);
}
UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn),
(CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker);
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits