Branch Coverage

inc/matrixssl-3-9-3-open/crypto/keyformat/asn1.c
Criterion Covered Total %
branch 60 124 48.3


line true false branch
44 0 0 if (p == NULL || *p == 0)
0 0 if (p == NULL || *p == 0)
49 0 0 if (len >= 0x80)
53 0 0 if (len == 0 || len >= 4)
0 0 if (len == 0 || len >= 4)
88 0 106883 if ((rc = getAsnLength32(pp, size, &len32, 0)) < 0)
105 0 217749 if (end - c < 1)
116 23608 194141 if (*c & 0x80)
121 0 23608 if (end - c < l)
152 0 0 if (indefinite)
172 217749 0 if (!indefinite && (end - c < l))
0 217749 if (!indefinite && (end - c < l))
197 73426 0 if (size < 1 || *(p++) != (ASN_SEQUENCE | ASN_CONSTRUCTED) ||
73415 11 if (size < 1 || *(p++) != (ASN_SEQUENCE | ASN_CONSTRUCTED) ||
0 73415 if (size < 1 || *(p++) != (ASN_SEQUENCE | ASN_CONSTRUCTED) ||
205 73415 0 if (!indefinite && (size - ((uint32_t) (p - *pp))) < *len)
0 73415 if (!indefinite && (size - ((uint32_t) (p - *pp))) < *len)
225 8 59436 if ((rc = getAsnSequence32(pp, size, &len32, 0)) < 0)
245 22835 0 if (size < 1 || *(p++) != (ASN_SET | ASN_CONSTRUCTED) ||
22835 0 if (size < 1 || *(p++) != (ASN_SET | ASN_CONSTRUCTED) ||
0 22835 if (size < 1 || *(p++) != (ASN_SET | ASN_CONSTRUCTED) ||
252 0 22835 if (size < ((uint32_t) (p - *pp) + *len))
265 0 22835 if ((rc = getAsnSet32(pp, size, &len32, 0)) < 0)
285 0 0 if (len < 1 || *(p++) != ASN_ENUMERATED ||
0 0 if (len < 1 || *(p++) != ASN_ENUMERATED ||
0 0 if (len < 1 || *(p++) != ASN_ENUMERATED ||
296 0 0 if (vlen > sizeof(int32_t) || (uint32_t) (end - p) < vlen)
0 0 if (vlen > sizeof(int32_t) || (uint32_t) (end - p) < vlen)
306 0 0 if (*p & 0x80)
308 0 0 while (vlen > 0)
321 0 0 while (vlen > 0)
346 3516 0 if (len < 1 || *(p++) != ASN_INTEGER ||
3516 0 if (len < 1 || *(p++) != ASN_INTEGER ||
0 3516 if (len < 1 || *(p++) != ASN_INTEGER ||
357 3516 0 if (vlen > sizeof(int32_t) || (uint32_t) (end - p) < vlen)
0 3516 if (vlen > sizeof(int32_t) || (uint32_t) (end - p) < vlen)
367 0 3516 if (*p & 0x80)
369 0 0 while (vlen > 0)
382 3550 3516 while (vlen > 0)
407 11102 0 if (len < 1 || (rc = getAsnSequence32(&p, len, &llen, 0)) < 0)
2 11100 if (len < 1 || (rc = getAsnSequence32(&p, len, &llen, 0)) < 0)
413 0 11100 if (end - p < 1)
437 0 10831 if (derlen < 1)
447 140803 10831 for (n = MAX_OID_LEN - 1; n > 2; n--)
451 27524 10831 while (der < end && n < MAX_OID_LEN)
27524 0 while (der < end && n < MAX_OID_LEN)
454 24558 2966 if (!(*der & 0x80))
466 2966 4405 if (!(*der & 0x80))
471 0 4405 if (++sanity > 4)
479 4405 0 while (der < end);
484 10831 0 if (n < MAX_OID_LEN)
590 16018 630 if (oidLen == oid_hex[1] && !memcmp(oidStart, &oid_hex[2], oidLen))
11100 4918 if (oidLen == oid_hex[1] && !memcmp(oidStart, &oid_hex[2], oidLen))
613 11100 0 if (*(p++) != ASN_OID || (rc = getAsnLength32(&p, (uint32_t) (end - p), &arcLen, 0))
0 11100 if (*(p++) != ASN_OID || (rc = getAsnLength32(&p, (uint32_t) (end - p), &arcLen, 0))
619 0 11100 if (end - p < arcLen)
623 0 11100 if (end - p < 2)
631 99517 11100 while (arcLen > 0)
642 11100 0 if (checkForParams)
646 423 10677 if (*p != ASN_NULL)
657 0 10677 if (end - p < 2)
662 0 10677 if (*paramLen < 2)