]> granicus.if.org Git - clang/commit
Fix buffer underrun (invalid read) triggered during diagnostic rendering. The test...
authorTed Kremenek <kremenek@apple.com>
Fri, 15 Mar 2013 23:09:37 +0000 (23:09 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 15 Mar 2013 23:09:37 +0000 (23:09 +0000)
commit316dd5467bed9242088149fe92f3316ef4f235e9
tree1a099b418e046dafcf8cf7c6e7c35ae2d46371d9
parent9cc3ed4e4d7f25b1af8ba7b85d324a0bb8747640
Fix buffer underrun (invalid read) triggered during diagnostic rendering.  The test would overflow when computing '0 - 1'.

I don't have a good testcase for this that does not depend on system headers.
It did not trigger with preprocessed output, and I had trouble reducing the example.

Fixes <rdar://problem/13324594>.

Thanks to Michael Greiner for reporting this issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177201 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/TextDiagnostic.cpp