From: 0xDEADFACE Date: Mon, 17 Feb 2014 18:18:58 +0000 (-0800) Subject: Merge pull request #5 from CryptoManiac/master X-Git-Tag: v0.4.4.6-nvc-update2~2 X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=38cce5489278575892eb94510dd024f6f05ba421;hp=2bb194b8d6bd1137877bbb34830c8f56967846dd;p=novacoin.git Merge pull request #5 from CryptoManiac/master CheckTransaction() strengthening --- diff --git a/src/main.cpp b/src/main.cpp index c4f3d17..4f10bfe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -486,6 +486,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;