]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/NvmExpress: Fix bug of handling not null-terminated strings
authorFeng Tian <feng.tian@intel.com>
Tue, 26 Apr 2016 07:16:26 +0000 (15:16 +0800)
committerFeng Tian <feng.tian@intel.com>
Tue, 26 Apr 2016 07:44:55 +0000 (15:44 +0800)
commitda7c72740f7f7172ffa0e62a512ad291ea0f4f87
tree6e579dacbb4e316c24b8ba2a0d0e50233e7940b5
parentac231001f5c08356b236dc96aacb3015720cddf0
MdeModulePkg/NvmExpress: Fix bug of handling not null-terminated strings

In EnumerateNvmeDevNamespace(), when Private->ControllerData->Sn and/or
Private->ControllerData->Mn are NOT null-terminated strings,
UnicodeSPrintAsciiFormat(…) may generate unexpected (garbage) output
string.

Cc: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c