Branch Coverage

crypt_blowfish.c
Criterion Covered Total %
branch 74 144 51.3


line true false branch
393 0 372 BF_safe_atoi64(c1, *sptr++);
0 372 BF_safe_atoi64(c1, *sptr++);
394 0 372 BF_safe_atoi64(c2, *sptr++);
0 372 BF_safe_atoi64(c2, *sptr++);
396 62 310 if (dptr >= end) break;
398 0 310 BF_safe_atoi64(c3, *sptr++);
0 310 BF_safe_atoi64(c3, *sptr++);
400 0 310 if (dptr >= end) break;
402 0 310 BF_safe_atoi64(c4, *sptr++);
0 310 BF_safe_atoi64(c4, *sptr++);
404 310 0 } while (dptr < end);
420 0 496 if (sptr >= end) {
429 62 434 if (sptr >= end) {
438 434 0 } while (sptr < end);
447 124 0 if (*is_little_endian)
452 496 124 } while (--count);
590 2232 124 for (i = 0; i < BF_N + 2; i++) {
592 8928 2232 for (j = 0; j < 4; j++) {
603 6696 2232 if (j)
605 1005 7923 if (!*ptr)
670 0 62 if (size < 7 + 22 + 31 + 1) {
675 62 0 if (setting[0] != '$' ||
62 0 if (setting[0] != '$' ||
676 62 0 setting[1] != '2' ||
677 62 0 setting[2] < 'a' || setting[2] > 'z' ||
62 0 setting[2] < 'a' || setting[2] > 'z' ||
678 62 0 !flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] ||
679 62 0 setting[3] != '$' ||
680 62 0 setting[4] < '0' || setting[4] > '3' ||
62 0 setting[4] < '0' || setting[4] > '3' ||
681 62 0 setting[5] < '0' || setting[5] > '9' ||
0 62 setting[5] < '0' || setting[5] > '9' ||
682 0 0 (setting[4] == '3' && setting[5] > '1') ||
0 62 (setting[4] == '3' && setting[5] > '1') ||
689 62 0 if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
0 62 if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
701 558 62 for (i = 0; i < BF_N + 2; i += 2) {
723 15810 62 } while (ptr < &data.ctx.S[3][0xFF]);
728 486711 54079 for (i = 0; i < BF_N + 2; i += 2) {
735 865264 108158 BF_body();
55268738 108158 BF_body();
736 54079 54079 if (done)
744 216316 54079 for (i = 0; i < BF_N; i += 4) {
753 54017 62 } while (--count);
755 186 62 for (i = 0; i < 6; i += 2) {
762 11718 186 } while (--count);
783 0 31 if (size < 3)
790 0 31 if (setting[0] == '*' && setting[1] == '0')
0 0 if (setting[0] == '*' && setting[1] == '0')
846 31 0 if (retval) {
856 31 0 ok = (p == buf.o &&
857 31 0 !memcmp(p, buf.s, 7 + 22) &&
31 0 !memcmp(p, buf.s, 7 + 22) &&
866 31 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
31 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
31 0 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
867 31 0 !memcmp(ae, ye, sizeof(ae)) &&
31 0 !memcmp(ae, ye, sizeof(ae)) &&
872 31 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;