From: CryptoManiac Date: Mon, 17 Feb 2014 18:07:38 +0000 (+0400) Subject: CheckTransaction() strengthening X-Git-Tag: v0.4.4.7-nvc-bugfix3~4^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=e3d3175809cd58d6bfab620cbf95cbc691323a93 CheckTransaction() strengthening --- diff --git a/src/main.cpp b/src/main.cpp index f3682e7..392090d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -592,6 +592,8 @@ bool CTransaction::CheckTransaction() const if (!fTestNet && !IsCoinBase() && !txout.IsEmpty() && nTime < OUTPUT_SWITCH_TIME && txout.nValue < MIN_TXOUT_AMOUNT) return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue below minimum")); + if (txout.nValue < 0) + return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue is negative")); if (txout.nValue > MAX_MONEY) return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high")); nValueOut += txout.nValue;