Open GoogleCodeExporter opened 9 years ago
The problem is overrunning the end of the allocated space for temp. The
following patch fixes it.
Index: BlockChain.cpp
===================================================================
--- BlockChain.cpp (revision 55)
+++ BlockChain.cpp (working copy)
@@ -4347,7 +4347,7 @@
bool found = false;
if ( c > 0 )
{
- for (uint32_t i=0; i<c; i++)
+ for (uint32_t i=0; i<=(c-sizeof(uint32_t)); i++)
{
const uint32_t *check = (const uint32_t *)&temp[i];
if ( *check == MAGIC_ID )
Now everything appears to be parsed and the end of the output is
Total Blocks: 278,732
Total Transactions: 30,450,226
Total Inputs: 67,033,514
Total Outputs: 74,892,566
real 2m7.937s
user 1m51.051s
sys 0m7.805s
The number of blocks and transactions is correct (at the moment, obviously).
Original comment by bruce.ho...@gmail.com
on 5 Jan 2014 at 11:27
Original issue reported on code.google.com by
bruce.ho...@gmail.com
on 5 Jan 2014 at 11:13