Lines Matching refs:nbytes
838 size_t nbytes = b->flen; in moffset() local
948 o = der_offs(ms, m, nbytes); in moffset()
949 if (o == -1 || CAST(size_t, o) > nbytes) { in moffset()
953 SIZE_T_FORMAT "u", o, nbytes); in moffset()
969 if (CAST(size_t, o) > nbytes) { in moffset()
972 "u > %" SIZE_T_FORMAT "u", (size_t)o, nbytes); in moffset()
1310 const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m) in mcopy() argument
1320 if (offset > nbytes) in mcopy()
1321 offset = CAST(uint32_t, nbytes); in mcopy()
1323 ms->search.s_len = nbytes - offset; in mcopy()
1335 if (s == NULL || nbytes < offset) { in mcopy()
1349 if (bytecnt == 0 || bytecnt > nbytes - offset) in mcopy()
1350 bytecnt = nbytes - offset; in mcopy()
1381 const unsigned char *esrc = s + nbytes; in mcopy()
1389 if (offset >= nbytes) in mcopy()
1420 if (offset >= nbytes) { in mcopy()
1424 if (nbytes - offset < sizeof(*p)) in mcopy()
1425 nbytes = nbytes - offset; in mcopy()
1427 nbytes = sizeof(*p); in mcopy()
1429 (void)memcpy(p, s + offset, nbytes); in mcopy()
1435 if (nbytes < sizeof(*p)) in mcopy()
1436 (void)memset(RCAST(char *, RCAST(void *, p)) + nbytes, '\0', in mcopy()
1437 sizeof(*p) - nbytes); in mcopy()
1550 const unsigned char *s, size_t nbytes, size_t o, unsigned int cont_level, in mget() argument
1580 CAST(uint32_t, offset + o), CAST(uint32_t, nbytes), m) == -1) in mget()
1587 m->type, m->flag, offset, o, nbytes, in mget()
1605 if (OFFSET_OOB(nbytes, offset + off, 1)) in mget()
1610 if (OFFSET_OOB(nbytes, offset + off, 2)) in mget()
1615 if (OFFSET_OOB(nbytes, offset + off, 2)) in mget()
1620 if (OFFSET_OOB(nbytes, offset + off, 2)) in mget()
1625 if (OFFSET_OOB(nbytes, offset + off, 4)) in mget()
1631 if (OFFSET_OOB(nbytes, offset + off, 4)) in mget()
1637 if (OFFSET_OOB(nbytes, offset + off, 4)) in mget()
1642 if (OFFSET_OOB(nbytes, offset + off, 4)) in mget()
1647 if (OFFSET_OOB(nbytes, offset + off, 8)) in mget()
1652 if (OFFSET_OOB(nbytes, offset + off, 8)) in mget()
1666 if (OFFSET_OOB(nbytes, offset, 1)) in mget()
1671 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1676 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1681 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1687 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1696 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1704 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1709 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1714 if (OFFSET_OOB(nbytes, offset, 8)) in mget()
1719 if (OFFSET_OOB(nbytes, offset, 8)) in mget()
1746 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1762 if (OFFSET_OOB(nbytes, offset, 1)) in mget()
1769 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1788 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1795 if (OFFSET_OOB(nbytes, offset, 8)) in mget()
1800 if (OFFSET_OOB(nbytes, offset, 16)) in mget()
1807 if (OFFSET_OOB(nbytes, offset, m->vallen)) in mget()
1812 if (nbytes < offset) in mget()
1822 if (nbytes < offset) in mget()
1831 bb.flen = nbytes - offset; in mget()
1858 if (nbytes < offset) in mget()