r273319 - Trying to fix a buffer overflow that broke buildbot sanitizer-x86_64-linux-fast/builds/13946.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 13:49:50 PDT 2016
Author: ioeric
Date: Tue Jun 21 15:49:50 2016
New Revision: 273319
URL: http://llvm.org/viewvc/llvm-project?rev=273319&view=rev
Log:
Trying to fix a buffer overflow that broke buildbot sanitizer-x86_64-linux-fast/builds/13946.
Modified:
cfe/trunk/lib/Tooling/Core/Replacement.cpp
Modified: cfe/trunk/lib/Tooling/Core/Replacement.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Core/Replacement.cpp?rev=273319&r1=273318&r2=273319&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Core/Replacement.cpp (original)
+++ cfe/trunk/lib/Tooling/Core/Replacement.cpp Tue Jun 21 15:49:50 2016
@@ -322,7 +322,7 @@ calculateRangesAfterReplacements(const R
for (const auto &R : MergedRanges)
FakeReplaces.insert(Replacement(Replaces.begin()->getFilePath(),
R.getOffset(), R.getLength(),
- std::string(" ", R.getLength())));
+ std::string(R.getLength(), ' ')));
tooling::Replacements NewReplaces = mergeReplacements(FakeReplaces, Replaces);
return calculateChangedRanges(NewReplaces);
}
More information about the cfe-commits
mailing list