]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/C/Common/MemoryFile.c
BaseTools/Common: fix heap overrun in ReadMemoryFileLine ()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sun, 26 Jul 2015 08:03:15 +0000 (08:03 +0000)
committerjljusten <jljusten@Edk2>
Sun, 26 Jul 2015 08:03:15 +0000 (08:03 +0000)
commit2cec9ccde78005eb18fae975eeb573db4e87bc44
tree967df7921a240169f0746a3512399dae581a4d78
parent339a9f162ca646e51773b225cfe0a8ea968598b6
BaseTools/Common: fix heap overrun in ReadMemoryFileLine ()

ReadMemoryFileLine () appends a NULL character to the string
it returns, but it failed to account for it in the allocation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18047 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Source/C/Common/MemoryFile.c