]> git.proxmox.com Git - mirror_edk2.git/commit - IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
IntelFrameworkPkg FrameworkUefiLib: Fix ASSERT in CatVSPrint
authorHao Wu <hao.a.wu@intel.com>
Fri, 10 Jul 2015 01:08:05 +0000 (01:08 +0000)
committerhwu1225 <hwu1225@Edk2>
Fri, 10 Jul 2015 01:08:05 +0000 (01:08 +0000)
commit4129b837ae45db17c14b94f3a016915901443b93
treedbc35b3a4fb03fe9504fa8ef3fdbce9351abba7d
parent28e80befa4fe0edd7cce876e991fed912f0f2795
IntelFrameworkPkg FrameworkUefiLib: Fix ASSERT in CatVSPrint

This commit will resolve issue brought by r17740.

BufferToReturn = AllocateCopyPool(SizeRequired, String);

The above using of AllocateCopyPool() will cause ASSERT if 'String' is
NULL. Therefore, proper check for 'String' is needed.

The above using of AllocateCopyPool() will read contents out of the scope
of 'String'. Potential risk for 'String' allocated at the boundary of
memory region.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17906 6f19259b-4bc3-4df7-8a09-765794883524
IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c