aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-20 20:19:24 +0000
committerChris Lattner <sabre@nondot.org>2010-07-20 20:19:24 +0000
commit26008e07dea3ca4e4ee1f7634923059ea7f17f7a (patch)
tree8c49fce66759baecc9e1497120a425d04adc8af6 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent47a0f0d56f7a229bf2646c7b69fbe1ed43b87715 (diff)
downloadllvm-26008e07dea3ca4e4ee1f7634923059ea7f17f7a.zip
llvm-26008e07dea3ca4e4ee1f7634923059ea7f17f7a.tar.gz
llvm-26008e07dea3ca4e4ee1f7634923059ea7f17f7a.tar.bz2
implement rdar://5739832 - operator new should check for overflow in multiply,
causing clang to compile this code into something that correctly throws a length error, fixing a potential integer overflow security attack: void *test(long N) { return new int[N]; } int main() { test(1L << 62); } We do this even when exceptions are disabled, because it is better for the code to abort than for the attack to succeed. This is heavily based on a patch that Fariborz wrote. llvm-svn: 108915
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions