summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Utils.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-25 11:40:40 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-25 11:40:40 +0000
commitd3c3e78ac17602420ca05b1ce1ed7d20ba9c5ede (patch)
treef1557da8c7b007803d97eb97c40f6aa684e195bc /llvm/lib/Transforms/Utils/Utils.cpp
parenta63672665f98c6a9df6da6fe7359a3d0a732d1a6 (diff)
downloadbcm5719-llvm-d3c3e78ac17602420ca05b1ce1ed7d20ba9c5ede.tar.gz
bcm5719-llvm-d3c3e78ac17602420ca05b1ce1ed7d20ba9c5ede.zip
Lex: Fix an invalid access into a SmallString
We would crash because we used operator[] to access past the end of a SmallString. This occured because our token had length zero. Instead, form the pointer using .data() and arithmetic. This is safe because this forms a one-past-the-end pointer and it is only used to compare with another one-past-the-end pointer. This fixes PR21379. llvm-svn: 220614
Diffstat (limited to 'llvm/lib/Transforms/Utils/Utils.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud