boundary check for block size in padding related routines