File::Read(), when asked to read the contents of a file into a heap
authorJason Molenda <jmolenda@apple.com>
Thu, 22 Jan 2015 00:41:05 +0000 (00:41 +0000)
committerJason Molenda <jmolenda@apple.com>
Thu, 22 Jan 2015 00:41:05 +0000 (00:41 +0000)
commit03176d781f32d265cf3333af6abb22577c160f12
tree439d295980578a91277eadb5b43c4c576ddb783a
parentd50c398c69df970e393566bdc2dd4e5100b78cda
File::Read(), when asked to read the contents of a file into a heap
buffer and to add a nul terminator byte, was incorrectly resizing
its buffer so the nul terminator was not included.

Problem found by clang ASAN instrumentation when using an
expression prefix file which was read via this mechanism.

<rdar://problem/19556459>

llvm-svn: 226753
lldb/source/Host/common/File.cpp