Don't possibly dereference bad signatures in OP_CHECKMULTISIG.
Don't possibly dereference bad signatures in OP_CHECKMULTISIG.

We do all the preprocessing in one loop. Fixes a bug introduced a while ago to
handle invalid signatures. Found by more tests from bitcoind.

adiabat/btcd,qchain/btcd,Stash-Crypto/btcd,btcsuite/btcd,pkothbauer/btcd,CryptocurrencyCabal/htcd,stevenroose/btcd,pkothbauer/btcd,soapboxsys/ombfullnode,jrick/dcrd,cqswxj2013/btcd,glv2/ppcd,hectorj/btcd,jcmincke/dcrd,glv2/ppcd,btcsuitereleases/btcd,CryptocurrencyCabal/htcd,ppcsuite/ppcd-old,Roasbeef/btcd,jongillham/btcd,davecgh/btcd,mathiasrw/btcd,ltcsuite/ltcd,aakselrod/btcd,jrick/btcd,dajohi/btcd,jrick/btcd,jrick/btcd,stevenroose/btcd,cjepson/btcd,btcsuitereleases/btcd,danoctavian/btcd,wallclockbuilder/btcd,adiabat/btcd,decred/dcrd,DanielKrawisz/btcd,Stash-Crypto/btcd,btcsuite/btcd,jrick/dcrd,BitGo/prova,runeaune/btcd,davecgh/btcd,DanielKrawisz/btcd,jcmincke/dcrd,ppcsuite/ppcd,Dirbaio/btcd,jimmysong/btcd,Cleawing/btcd,sysbot/btcd,tb00/btcd,1d4Nf6/btcd,FactomProject/btcd,decred/dcrd,cjepson/btcd,Dirbaio/btcd,cqswxj2013/btcd,Roasbeef/btcd,toddfries/btcd,ppcsuite/ppcd-old,dan-da/btcd,tb00/btcd,BitGo/prova,sysbot/btcd,Dirbaio/btcd,dajohi/btcd,wallclockbuilder/btcd,FactomProject/btcd,dajohi/btcd,ltcsuite/ltcd,jcmincke/dcrd,1d4Nf6/btcd,jongillham/btcd,aakselrod/btcd,danoctavian/btcd,soapboxsys/ombfullnode,qchain/btcd,jimmysong/btcd,mathiasrw/btcd,ppcsuite/ppcd,toddfries/btcd,Cleawing/btcd,runeaune/btcd,dan-da/btcd,hectorj/btcd