From 579798182c5ccf92ef6ceb9c5209819824e5bec4 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 17 Feb 2014 22:07:38 +0400 Subject: [PATCH] CheckTransaction() strengthening --- src/main.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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; -- 1.7.1