Block length check

Check length of block data and ensure that if a block is not the last
block then its size is BLOCK_LENGTH