Branch Coverage

inc/matrixssl-3-9-3-open/core/psbuf.c
Criterion Covered Total %
branch 0 230 0.0


line true false branch
56 0 0 buf->size = buf->buf ? capacity : 0;
62 0 0 if (pool != psStaticAllocationsPool)
77 0 0 new = psMalloc(pool, len ? len : 1);
78 0 0 if (new)
94 0 0 if (data != NULL)
96 0 0 new = psMalloc(pool, len ? len : 1);
97 0 0 if (new != NULL)
105 0 0 return new ? PS_SUCCESS : PS_MEM_FAIL;
110 0 0 if (!data)
117 0 0 return data ? PS_SUCCESS : PS_ARG_FAIL;
122 0 0 if (!data)
128 0 0 return data ? PS_SUCCESS : PS_ARG_FAIL;
137 0 0 if (hexstr)
141 0 0 for (i = 0; i < len; i++)
162 0 0 if (loc + sz <= bufend)
178 0 0 assert(buf->start == buf->end); /* Must be done at the beginning. */
180 0 0 if (loc + sz <= bufend)
204 0 0 if (buf->buf <= buf->start && buf->buf + sz <= buf->start)
0 0 if (buf->buf <= buf->start && buf->buf + sz <= buf->start)
217 0 0 if (sz > 0)
234 0 0 if (reqLen < len)
240 0 0 if (len > *targetlen)
275 0 0 if (db->err)
292 0 0 assert(sub->master != NULL);
297 0 0 assert(sub->pool == NULL);
300 0 0 assert(sub->buf.buf >= db->buf.start && sub->buf.buf <= db->buf.end);
0 0 assert(sub->buf.buf >= db->buf.start && sub->buf.buf <= db->buf.end);
301 0 0 assert(sub->buf.buf + sub->buf.size >= db->buf.start &&
0 0 assert(sub->buf.buf + sub->buf.size >= db->buf.start &&
322 0 0 if (db->err)
327 0 0 if (head_sz != 0 && head_sz < PS_DYNBUF_GROW)
0 0 if (head_sz != 0 && head_sz < PS_DYNBUF_GROW)
331 0 0 if (tail_sz < PS_DYNBUF_GROW)
336 0 0 if (db->master)
351 0 0 if (loc)
354 0 0 if (offset_tail)
363 0 0 if (head_sz > 0)
400 0 0 if (alloc)
405 0 0 assert(loc != NULL);
426 0 0 if (loc == NULL)
428 0 0 if (psDynBufGrow(db, 0, sz))
431 0 0 assert(loc != NULL);
443 0 0 if (ch > 0x1FFFF)
448 0 0 if (ch < 128)
451 0 0 if (enc)
456 0 0 else if (ch <= 0x7FF)
460 0 0 if (enc)
466 0 0 else if (ch <= 0xffff)
470 0 0 if (enc)
481 0 0 if (enc)
498 0 0 if (db->buf.start == db->buf.end)
508 0 0 if (loc == NULL)
510 0 0 if (psDynBufGrow(db, sz, 0))
513 0 0 assert(loc != NULL);
523 0 0 if (mem)
555 0 0 if (db->err == 0 && at + length <= len)
0 0 if (db->err == 0 && at + length <= len)
587 0 0 if (sub->err)
600 0 0 if (sub->buf.buf != sub->buf.start && filled > 0)
0 0 if (sub->buf.buf != sub->buf.start && filled > 0)
604 0 0 if (offset_tail > 0)
622 0 0 if (len < 128)
626 0 0 else if (len < 256)
630 0 0 else if (len < 65536)
634 0 0 else if (len < 16777216)
647 0 0 if (len < 128)
651 0 0 else if (len < 256)
656 0 0 else if (len < 65536)
662 0 0 else if (len < 16777216)
685 0 0 if (target)
698 0 0 if (target)
711 0 0 if (target)
746 0 0 if (bytes < 2)
750 0 0 if (tag != 0 && ptr[0] != tag)
0 0 if (tag != 0 && ptr[0] != tag)
757 0 0 if (lenlen >= 0x80)
759 0 0 if (bytes < 0x83)
764 0 0 if (lenlen == 0x81 && ptr[2] < 0x80)
0 0 if (lenlen == 0x81 && ptr[2] < 0x80)
769 0 0 if (lenlen == 0x82 && ptr[2] == 0x00)
0 0 if (lenlen == 0x82 && ptr[2] == 0x00)
774 0 0 if (lenlen == 0x83 && ptr[2] == 0x00)
0 0 if (lenlen == 0x83 && ptr[2] == 0x00)
779 0 0 if (lenlen == 0x84 && ptr[2] == 0x00)
0 0 if (lenlen == 0x84 && ptr[2] == 0x00)
784 0 0 if (lenlen == 0x80 || lenlen > 0x84)
0 0 if (lenlen == 0x80 || lenlen > 0x84)
800 0 0 while (lenlen)
808 0 0 if (len_content > PS_PARSE_MAXIMUM_TAG_CONTENT)
815 0 0 if (len_out > bytes)
820 0 0 if (hdrLen_p)
839 0 0 if (psParseCanRead(pb, numbytes) &&
0 0 if (psParseCanRead(pb, numbytes) &&
853 0 0 if (sz == 0)
869 0 0 if (!content)
873 0 0 if (!len)
901 0 0 if (len == 0)
920 0 0 if (len)
933 0 0 if (sz)
945 0 0 if (sz)
957 0 0 if (pb->err != 0)
962 0 0 if (target == NULL)
968 0 0 if (len > *targetlen)
984 0 0 if (pb->err != 0)
989 0 0 if (reqLen > len)
994 0 0 if (target == NULL)
1000 0 0 if (reqLen > *targetlen)
1017 0 0 if (pb->err != 0)
1024 0 0 if (end == NULL)
1035 0 0 if (pb1->err || pb2->err)
0 0 if (pb1->err || pb2->err)
1045 0 0 return pb->err == 0 ? PS_SUCCESS : PS_FAILURE;
1052 0 0 if (pb->master)
1054 0 0 if (pb->err)
1080 0 0 if (pb->master)