This commit is contained in:
jl777
2017-03-27 10:11:48 +03:00
parent d965945bda
commit e41cf01052
6 changed files with 7 additions and 6 deletions

View File

@@ -2384,7 +2384,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
//fprintf(stderr,"count.%d %.8f\n",count,(double)pcoin->vout[i].interest/COIN);
interests[count++] = pcoin->vout[i].interest;
}
if ( nTotalLower > 2*nTargetValue + CENT )
if ( count >= sizeof(interests)/sizeof(*interests) && nTotalLower > 2*nTargetValue + CENT )
{
//fprintf(stderr,"why bother with all the utxo if we have double what is needed?\n");
break;