]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg OpalPasswordDxe:Fix wrong BufferSize input to UnicodeSPrint
authorStar Zeng <star.zeng@intel.com>
Thu, 15 Mar 2018 05:50:31 +0000 (13:50 +0800)
committerStar Zeng <star.zeng@intel.com>
Sat, 17 Mar 2018 07:49:01 +0000 (15:49 +0800)
Current code uses string length as BufferSize input to UnicodeSPrint,
it is wrong and makes the pop up string trimmed. The BufferSize input
to UnicodeSPrint should be the size, in bytes, of the output buffer.

This is to use sizeof (mPopUpString) as the BufferSize input to
UnicodeSPrint, it also updates array size of mPopUpString from 256 to
100 that is enough, otherwise the pop up string may be too long.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

No differences found