Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX
authorFilipe Cabecinhas <me@filcab.net>
Thu, 30 Apr 2015 00:52:42 +0000 (00:52 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Thu, 30 Apr 2015 00:52:42 +0000 (00:52 +0000)
commita607be94caf73ac9001f2cc01bae6298d76b29ae
tree29d697389daed3c16685eb4528181f866fe36253
parent46895011782c8afc497d3015580d2dd378777999
Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX

Make it an error instead.

Bug found with AFL fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236190 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
test/Bitcode/Inputs/invalid-too-big-fwdref.bc [new file with mode: 0644]
test/Bitcode/invalid.test