summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-23 03:57:22 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-23 03:57:22 +0000
commit49c5232d9f1fcd6af0e35f1613fc7fa2ddaba98b (patch)
treecbff8f9e4f9e94eaf023171a4acfe73b10aabbf0 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentd73d7add37f751a89e99bcc0fb1c0fcb82d98144 (diff)
downloadbcm5719-llvm-49c5232d9f1fcd6af0e35f1613fc7fa2ddaba98b.tar.gz
bcm5719-llvm-49c5232d9f1fcd6af0e35f1613fc7fa2ddaba98b.zip
Fix integer overflow in PCHReader when reading the length of an
identifier. This caused a crash when reading PCH files that contained long identifier names. The issue is that 'StrLenPtr' was previously a 'const char *', meaning the byte loaded from it would be interpretted as a signed integer. If the topmost bit was set, conversion to 'unsigned' would extend that bit, causing an overflow. The solution is to make 'StrLenPtr' an 'unsigned char *', always treating the value as an unsigned integer. This fixes: <rdar://problem/7328900> llvm-svn: 84925
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud