summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-05 04:23:56 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-04-05 04:23:56 +0000
commitef909265e8a4fb32405fe8fe5eb1b29c3d2bae1c (patch)
treeba4637b2d053cb541a30dfbc995ce678cffe232f /clang/lib/StaticAnalyzer
parent504957f413bcdfc3fea97cf98dcf6145736610f9 (diff)
downloadbcm5719-llvm-ef909265e8a4fb32405fe8fe5eb1b29c3d2bae1c.tar.gz
bcm5719-llvm-ef909265e8a4fb32405fe8fe5eb1b29c3d2bae1c.zip
In MemoryBuffer::getOpenFile() make sure that the buffer is null-terminated if
the caller requested a null-terminated one. When mapping the file there could be a racing issue that resulted in the file being larger than the FileSize passed by the caller. We already have an assertion for this in MemoryBuffer::init() but have a runtime guarantee that the buffer will be null-terminated, so do a copy that adds a null-terminator. Protects against crash of rdar://11161822. llvm-svn: 154082
Diffstat (limited to 'clang/lib/StaticAnalyzer')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud