# Gavin Andresen
# 2010-08-15 20:39:42
# https://bitcointalk.org/index.php?topic=823.msg9524#msg9524

Until there is a better fix... after a very small amount of testing this seems to work: @p{brk}

Code:
@p{@p{--}-} a/main.h @p{brk}
+++ b/main.h @p{brk}
@@ -473,8 +473,12 @@ public: @p{par}

         // Check for negative values @p{brk}
         foreach(const CTxOut& txout, vout) @p{brk}
+ { @p{brk}
             if (txout.nValue @p{lt} 0) @p{brk}
                 return error("CTransaction::CheckTransaction() : txout.nValue negative"); @p{brk}
+ if (txout.nValue @s{gt} 21000000*COIN) @p{brk}
+ return error("CTransaction::CheckTransaction() : txout.nValue over-max"); @p{brk}
+ } @p{par}

         if (IsCoinBase()) @p{brk}
         { @p{brk}
@@ -520,6 +524,8 @@ public: @p{brk}
         int64 nValueOut = 0; @p{brk}
         foreach(const CTxOut& txout, vout) @p{brk}
         { @p{brk}
+ if (txout.nValue @s{gt} 21000000*COIN) @p{brk}
+ continue; // ignore over-max-value... @p{brk}
             if (txout.nValue @p{lt} 0) @p{brk}
                 throw runtime_error("CTransaction::GetValueOut() : negative value"); @p{brk}
             nValueOut += txout.nValue; @p{par}


You'll need to re-download the part of the block chain before the bad block@p{--} remove the blkindex.dat and blk0001.dat files.   I started with @p{(link}knightmb's blockchain@p{link)} snapshot. @p{brk}