[PATCH] D84050: YAML: Don't assume an arbitrary StringRef is null terminated
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 10:08:27 PDT 2020
arsenm created this revision.
Herald added subscribers: hiraditya, wdng.
Herald added a project: LLVM.
https://reviews.llvm.org/D84050
Files:
llvm/lib/Support/YAMLParser.cpp
Index: llvm/lib/Support/YAMLParser.cpp
===================================================================
--- llvm/lib/Support/YAMLParser.cpp
+++ llvm/lib/Support/YAMLParser.cpp
@@ -773,7 +773,7 @@
IsSimpleKeyAllowed = true;
Failed = false;
std::unique_ptr<MemoryBuffer> InputBufferOwner =
- MemoryBuffer::getMemBuffer(Buffer);
+ MemoryBuffer::getMemBuffer(Buffer, false);
SM.AddNewSourceBuffer(std::move(InputBufferOwner), SMLoc());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84050.278830.patch
Type: text/x-patch
Size: 462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200717/7163ec3d/attachment.bin>
More information about the llvm-commits
mailing list