apedec: use unsigned int for 'nblocks' and make sure that it's within int range