From e29d54c95eed7cbcf9d0358bda0f159187207351 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 18 Jan 2016 03:54:23 -0300 Subject: [PATCH] test --- iguana/SuperNET.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/SuperNET.c b/iguana/SuperNET.c index fcaa46a5e..7697571a8 100644 --- a/iguana/SuperNET.c +++ b/iguana/SuperNET.c @@ -177,7 +177,7 @@ cJSON *SuperNET_bits2json(struct supernet_info *myinfo,int32_t validpub,bits256 vcalc_sha256(0,seed2.bytes,seed.bytes,sizeof(seed)); //char str[65]; printf("compressed len.%d seed2.(%s)\n",numbits,bits256_str(str,seed2)); datalen = ramcoder_decompress(space,IGUANA_MAXPACKETSIZE,&serialized[3],numbits,seed2); - if ( datalen > 0 && datalen < IGUANA_MAXPACKETSIZE ) + if ( datalen > sizeof(crc) && datalen < IGUANA_MAXPACKETSIZE ) { serialized = space; crc = calc_crc32(0,&serialized[sizeof(crc)],datalen - sizeof(crc));