diff options
| author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-09-27 21:24:36 +0000 |
|---|---|---|
| committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-09-27 21:24:36 +0000 |
| commit | 867c189d891f175969164515c6cb91e4d3650ea6 (patch) | |
| tree | c26abfeb321825411a52ad81f150fd4c9fcfe454 /lib/Support | |
| parent | 36fd952bc129a6ea694cdac11a10aba407c20930 (diff) | |
| download | external_llvm-867c189d891f175969164515c6cb91e4d3650ea6.zip external_llvm-867c189d891f175969164515c6cb91e4d3650ea6.tar.gz external_llvm-867c189d891f175969164515c6cb91e4d3650ea6.tar.bz2 | |
SourceMgr diagnotics printing: fix a bug where printing a fixit for a source
range that includes a tab character will cause out-of-bounds access to the
fixit string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
| -rw-r--r-- | lib/Support/SourceMgr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index fbcd8f9..d4b94f8 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -470,7 +470,7 @@ void SMDiagnostic::print(const char *ProgName, raw_ostream &S, if (FixItInsertionLine.empty()) return; - for (size_t i = 0, e = FixItInsertionLine.size(), OutCol = 0; i != e; ++i) { + for (size_t i = 0, e = FixItInsertionLine.size(), OutCol = 0; i < e; ++i) { if (i >= LineContents.size() || LineContents[i] != '\t') { S << FixItInsertionLine[i]; ++OutCol; |
