Lines Matching refs:nbytes

78 file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,  in file_softmagic()  argument
84 if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode, in file_softmagic()
121 const unsigned char *s, size_t nbytes, size_t offset, int mode, int text, in match() argument
159 switch (mget(ms, s, m, nbytes, offset, cont_level, mode, text, in match()
246 switch (mget(ms, s, m, nbytes, offset, cont_level, mode, in match()
1009 const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m) in mcopy() argument
1019 ms->search.s_len = nbytes - offset; in mcopy()
1037 if (bytecnt > nbytes) { in mcopy()
1038 bytecnt = nbytes; in mcopy()
1073 const unsigned char *esrc = s + nbytes; in mcopy()
1081 if (offset >= nbytes) { in mcopy()
1108 if (offset >= nbytes) { in mcopy()
1112 if (nbytes - offset < sizeof(*p)) in mcopy()
1113 nbytes = nbytes - offset; in mcopy()
1115 nbytes = sizeof(*p); in mcopy()
1117 (void)memcpy(p, s + offset, nbytes); in mcopy()
1123 if (nbytes < sizeof(*p)) in mcopy()
1124 (void)memset(((char *)(void *)p) + nbytes, '\0', in mcopy()
1125 sizeof(*p) - nbytes); in mcopy()
1131 size_t nbytes, size_t o, unsigned int cont_level, int mode, int text, in mget() argument
1147 (uint32_t)nbytes, m) == -1) in mget()
1152 "nbytes=%zu)\n", m->type, m->flag, offset, o, nbytes); in mget()
1197 if (OFFSET_OOB(nbytes, offset, 1)) in mget()
1232 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1284 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1336 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1373 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1444 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1514 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1584 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1643 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1656 if (OFFSET_OOB(nbytes, offset, 1)) in mget()
1663 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1682 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1689 if (OFFSET_OOB(nbytes, offset, 8)) in mget()
1696 if (OFFSET_OOB(nbytes, offset, m->vallen)) in mget()
1701 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1708 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1714 rv = file_softmagic(ms, s + offset, nbytes - offset, in mget()
1742 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1757 rv = match(ms, ml.magic, ml.nmagic, s, nbytes, offset + o, in mget()