diff options
author | Dale Johannesen <dalej@apple.com> | 2008-04-16 17:31:41 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-04-16 17:31:41 +0000 |
commit | 4675c4e7e72480d5f75bd2c667ff20c203d9aa82 (patch) | |
tree | 4bf0f55f5d051307ec937c68bb5e634d94efd43e /llvm/lib/VMCore/AsmWriter.cpp | |
parent | ed30e8da560a34f5d6c52f9a86e7478c841f853c (diff) | |
download | bcm5719-llvm-4675c4e7e72480d5f75bd2c667ff20c203d9aa82.tar.gz bcm5719-llvm-4675c4e7e72480d5f75bd2c667ff20c203d9aa82.zip |
Don't read off end of the input array.
llvm-svn: 49799
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index a2de5d99a05..2eb37db7e68 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -527,7 +527,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, Out << (unsigned char)(nibble + '0'); else Out << (unsigned char)(nibble - 10 + 'A'); - if (shiftcount == 0) { + if (shiftcount == 0 && j+4 < width) { word = *(++p); shiftcount = 64; if (width-j-4 < 64) |