mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
cb21fcbb65
commit
dba2756893
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue