Branch Coverage

crypt_blowfish.c
Criterion Covered Total %
branch 74 144 51.3


line true false branch
393 0 408 BF_safe_atoi64(c1, *sptr++);
0 408 BF_safe_atoi64(c1, *sptr++);
394 0 408 BF_safe_atoi64(c2, *sptr++);
0 408 BF_safe_atoi64(c2, *sptr++);
396 68 340 if (dptr >= end) break;
398 0 340 BF_safe_atoi64(c3, *sptr++);
0 340 BF_safe_atoi64(c3, *sptr++);
400 0 340 if (dptr >= end) break;
402 0 340 BF_safe_atoi64(c4, *sptr++);
0 340 BF_safe_atoi64(c4, *sptr++);
404 340 0 } while (dptr < end);
420 0 544 if (sptr >= end) {
429 68 476 if (sptr >= end) {
438 476 0 } while (sptr < end);
447 136 0 if (*is_little_endian)
452 544 136 } while (--count);
590 2448 136 for (i = 0; i < BF_N + 2; i++) {
592 9792 2448 for (j = 0; j < 4; j++) {
603 7344 2448 if (j)
605 1072 8720 if (!*ptr)
670 0 68 if (size < 7 + 22 + 31 + 1) {
675 68 0 if (setting[0] != '$' ||
68 0 if (setting[0] != '$' ||
676 68 0 setting[1] != '2' ||
677 68 0 setting[2] < 'a' || setting[2] > 'z' ||
68 0 setting[2] < 'a' || setting[2] > 'z' ||
678 68 0 !flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] ||
679 68 0 setting[3] != '$' ||
680 68 0 setting[4] < '0' || setting[4] > '3' ||
68 0 setting[4] < '0' || setting[4] > '3' ||
681 68 0 setting[5] < '0' || setting[5] > '9' ||
0 68 setting[5] < '0' || setting[5] > '9' ||
682 0 0 (setting[4] == '3' && setting[5] > '1') ||
0 68 (setting[4] == '3' && setting[5] > '1') ||
689 68 0 if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
0 68 if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
701 612 68 for (i = 0; i < BF_N + 2; i += 2) {
723 17340 68 } while (ptr < &data.ctx.S[3][0xFF]);
728 634194 70466 for (i = 0; i < BF_N + 2; i += 2) {
735 1127456 140932 BF_body();
72016252 140932 BF_body();
736 70466 70466 if (done)
744 281864 70466 for (i = 0; i < BF_N; i += 4) {
753 70398 68 } while (--count);
755 204 68 for (i = 0; i < 6; i += 2) {
762 12852 204 } while (--count);
783 0 34 if (size < 3)
790 0 34 if (setting[0] == '*' && setting[1] == '0')
0 0 if (setting[0] == '*' && setting[1] == '0')
846 34 0 if (retval) {
856 34 0 ok = (p == buf.o &&
857 34 0 !memcmp(p, buf.s, 7 + 22) &&
34 0 !memcmp(p, buf.s, 7 + 22) &&
866 34 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
34 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
34 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
867 34 0 !memcmp(ae, ye, sizeof(ae)) &&
34 0 !memcmp(ae, ye, sizeof(ae)) &&
872 34 0 if (ok)
884 0 0 if (size < 16 || output_size < 7 + 22 + 1 ||
0 0 if (size < 16 || output_size < 7 + 22 + 1 ||
0 0 if (size < 16 || output_size < 7 + 22 + 1 ||
885 0 0 (count && (count < 4 || count > 31)) ||
0 0 (count && (count < 4 || count > 31)) ||
0 0 (count && (count < 4 || count > 31)) ||
886 0 0 prefix[0] != '$' || prefix[1] != '2' ||
0 0 prefix[0] != '$' || prefix[1] != '2' ||
887 0 0 (prefix[2] != 'a' && prefix[2] != 'b' && prefix[2] != 'y')) {
0 0 (prefix[2] != 'a' && prefix[2] != 'b' && prefix[2] != 'y')) {
888 0 0 if (output_size > 0) output[0] = '\0';
889 0 0 __set_errno((output_size < 7 + 22 + 1) ? ERANGE : EINVAL);
893 0 0 if (!count) count = 5;