]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/BasePrintLib/PrintLibInternal.c
MdePkg/BasePrintLib: Fix error in Precision position calculation
authorJian J Wang <jian.j.wang@intel.com>
Mon, 25 Dec 2017 02:07:39 +0000 (10:07 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 28 Dec 2017 03:12:07 +0000 (11:12 +0800)
commit6805854a736b0e0192fb4863da4db4295345c87b
tree354241a95576aa6cb8a45817fba109f6d5527a86
parentc24d664dca26c41bbba84ca37b54e81f85bcb249
MdePkg/BasePrintLib: Fix error in Precision position calculation

Due to a potential hole in the stop condition of loop, the two continuous
access to ArgumentString (index, index+1) inside the loop might cause the
string ending character ('\0') and the byte after it to be read.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Library/BasePrintLib/PrintLibInternal.c