aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
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
commitff1ea462bf6f079a786c600d5fc3716235ad9f22 (patch)
tree4ff00b3d3fb079b5ee06521e67912f84826887cb /lib/CodeGen/CodeGenFunction.h
parentca2c3e2cfc630db614298e8d7f2aaca4507e01e1 (diff)
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> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions