diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2017-02-15 15:56:14 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2017-02-15 15:56:14 +0000 |
| commit | 879f167235e95b7cbc55318defb1f71255390712 (patch) | |
| tree | 0c2c22764e22cb964d5abbda9c12b8c038cf5265 /clangd/ProtocolHandlers.cpp | |
| parent | f137373595d507339d89b35aeb37f6ba00195339 (diff) | |
[clangd] Fix use after free.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@295187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clangd/ProtocolHandlers.cpp')
| -rw-r--r-- | clangd/ProtocolHandlers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clangd/ProtocolHandlers.cpp b/clangd/ProtocolHandlers.cpp index 67a73fee..7d321a2f 100644 --- a/clangd/ProtocolHandlers.cpp +++ b/clangd/ProtocolHandlers.cpp @@ -95,7 +95,7 @@ void TextDocumentRangeFormattingHandler::handleMethod( return; } - StringRef Code = Store.getDocument(DRFP->textDocument.uri); + std::string Code = Store.getDocument(DRFP->textDocument.uri); size_t Begin = positionToOffset(Code, DRFP->range.start); size_t Len = positionToOffset(Code, DRFP->range.end) - Begin; |
