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)
commitbad0779f6310af38570f4fcfc68ea876d5e4dca7
tree39e5d606a7417e837fe513a953bbaa77c6a78e8c
parent34948e5e22079597714618a724feb70eeaba2609
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.

llvm-svn: 236190
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/Bitcode/Inputs/invalid-too-big-fwdref.bc [new file with mode: 0644]
llvm/test/Bitcode/invalid.test