// validate checksum
uint8 addressHash[32];
sha256_ctx s256c;
sha256_init(&s256c);
sha256_update(&s256c, walletAddressRaw, walletAddressRawLength-4);
sha256_final(&s256c, addressHash);
sha256_init(&s256c);
sha256_update(&s256c, addressHash, 32);
sha256_final(&s256c, addressHash);
if( *(uint32*)(walletAddressRaw+21) != *(uint32*)addressHash )
{
printf("xptClient_addDeveloperFeeEntry(): Invalid checksum\n");
return;
}
// address ok, check if there is still free space in the list
if( xptClient->developerFeeCount >= XPT_DEVELOPER_FEE_MAX_ENTRIES )
{
printf("xptClient_addDeveloperFeeEntry(): Maximum number of developer fee entries exceeded\n");
return;
}
This is causing the problem I imagine. Can anyone modify the client assuming they are following the same code sha checks. I wouldn't know where to start