Lines Matching refs:nbytes

1227  		if (nbytes < compr[i].maglen)
2414 ssize_t nbytes = 0; /* number of bytes read from a datafile */
2493 - while ((r = sread(fd, (void *)&buf[nbytes],
2494 - (size_t)(HOWMANY - nbytes), 1)) > 0) {
2495 - nbytes += r;
2499 - if (nbytes == 0) {
2508 - if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {
2512 + if ((nbytes = php_stream_read(stream, (char *)buf, HOWMANY)) < 0) {
2517 (void)memset(buf + nbytes, 0, SLOP); /* NUL terminate */
2518 - if (file_buffer(ms, fd, inname, buf, (size_t)nbytes) == -1)
2519 + if (file_buffer(ms, stream, inname, buf, (size_t)nbytes) == -1)
2915 /*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
2917 file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
2924 if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
3071 - const unsigned char *s, uint32_t offset, size_t nbytes, size_t linecnt)
3072 + const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m)
3089 + if (bytecnt > nbytes) {
3090 + bytecnt = nbytes;
3098 - end = last = RCAST(const char *, s) + nbytes;
3107 - last = RCAST(const char *, s) + nbytes;
3124 - (uint32_t)nbytes, count) == -1)
3125 + (uint32_t)nbytes, m) == -1)
3130 - "nbytes=%zu, count=%u)\n", m->type, m->flag, offset, o,
3131 - nbytes, count);
3132 + "nbytes=%zu)\n", m->type, m->flag, offset, o, nbytes);
3144 - if (nbytes < (offset + 1))
3145 + if (OFFSET_OOB(nbytes, offset, 1))
3153 - if (nbytes < (offset + 2))
3154 + if (OFFSET_OOB(nbytes, offset, 2))
3162 - if (nbytes < (offset + 2))
3163 + if (OFFSET_OOB(nbytes, offset, 2))
3171 - if (nbytes < (offset + 2))
3172 + if (OFFSET_OOB(nbytes, offset, 2))
3180 - if (nbytes < (offset + 4))
3181 + if (OFFSET_OOB(nbytes, offset, 4))
3189 - if (nbytes < (offset + 4))
3190 + if (OFFSET_OOB(nbytes, offset, 4))
3198 - if (nbytes < (offset + 4))
3199 + if (OFFSET_OOB(nbytes, offset, 4))
3207 - if (nbytes < (offset + 4))
3208 + if (OFFSET_OOB(nbytes, offset, 4))
3216 - if (mcopy(ms, p, m->type, 0, s, offset, nbytes, count) == -1)
3217 + if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1)
3233 - if (nbytes < (offset + 1)) /* should alway be true */
3234 + if (OFFSET_OOB(nbytes, offset, 1))
3241 - if (nbytes < (offset + 2))
3242 + if (OFFSET_OOB(nbytes, offset, 2))
3250 - if (nbytes < (offset + 4))
3251 + if (OFFSET_OOB(nbytes, offset, 4))
3258 - if (nbytes < (offset + 8))
3259 + if (OFFSET_OOB(nbytes, offset, 8))
3266 - if (nbytes < (offset + m->vallen))
3267 + if (OFFSET_OOB(nbytes, offset, m->vallen))
3272 - if (nbytes < offset)
3273 + if (OFFSET_OOB(nbytes, offset, 0))
3278 - if (nbytes < offset)
3281 + if (OFFSET_OOB(nbytes, offset, 0))
3287 rv = file_softmagic(ms, s + offset, nbytes - offset,
3319 - if (nbytes < offset)
3320 + if (OFFSET_OOB(nbytes, offset, 0))