check cbp for validity, avoids possible out of array reads / segfaults