Lines Matching refs:nbuf

353 	unsigned char nbuf[BUFSIZ];
398 len = xph_filesz < sizeof(nbuf) ? xph_filesz : sizeof(nbuf);
400 if ((bufsize = pread(fd, nbuf, len, offs)) == -1) {
410 offset = donote(ms, nbuf, offset, CAST(size_t, bufsize),
549 do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
553 if (namesz == 4 && strcmp(RCAST(char *, &nbuf[noff]), "GNU") == 0 &&
575 memcpy(desc, &nbuf[doff], descsz);
581 if (namesz == 4 && strcmp(RCAST(char *, &nbuf[noff]), "Go") == 0 &&
586 RCAST(const char *, &nbuf[doff]))) == -1)
594 do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
598 const char *name = RCAST(const char *, &nbuf[noff]);
603 if (file_printf(ms, ", for SuSE %d.%d", nbuf[doff],
604 nbuf[doff + 1]) == -1)
612 memcpy(desc, &nbuf[doff], sizeof(desc));
651 if (do_note_netbsd_version(ms, swap, &nbuf[doff]) == -1)
660 if (do_note_freebsd_version(ms, swap, &nbuf[doff])
682 memcpy(&desc, &nbuf[doff], sizeof(desc));
693 do_pax_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
697 const char *name = RCAST(const char *, &nbuf[noff]);
714 memcpy(&desc, &nbuf[doff], sizeof(desc));
733 do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
739 const char *name = RCAST(const char *, &nbuf[noff]);
784 memcpy(&pi, nbuf + doff, MIN(descsz, sizeof(pi)));
812 if (file_printf(ms, ", from '%.80s'", nbuf + doff +
818 elf_getu32(swap, *RCAST(uint32_t *, (nbuf +
864 c = nbuf[noffset];
910 && isprint(nbuf[no]);
916 &nbuf[doff + prpsoffsets(i)]);
917 for (cp = cname; cp < nbuf + size && *cp
1013 do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
1055 memcpy(xauxv_addr, &nbuf[doff + off], xauxv_sizeof);
1165 unsigned char *nbuf = CAST(unsigned char *, vbuf);
1181 memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
1226 if (do_os_note(ms, nbuf, xnh_type, swap,
1232 if (do_bid_note(ms, nbuf, xnh_type, swap,
1238 if (do_pax_note(ms, nbuf, xnh_type, swap,
1244 if (do_core_note(ms, nbuf, xnh_type, swap,
1250 if (do_auxv_note(ms, nbuf, xnh_type, swap,
1256 if (namesz == 7 && strcmp(RCAST(char *, &nbuf[noff]), "NetBSD") == 0) {
1287 str = RCAST(const char *, &nbuf[doff]);
1357 void *nbuf;
1459 if ((nbuf = malloc(xsh_size)) == NULL) {
1465 if (pread(fd, nbuf, xsh_size, offs) <
1467 free(nbuf);
1479 noff = donote(ms, nbuf, CAST(size_t, noff),
1485 free(nbuf);
1662 unsigned char nbuf[BUFSIZ];
1726 size_t len = xph_filesz < sizeof(nbuf) ? xph_filesz
1727 : sizeof(nbuf);
1729 bufsize = pread(fd, nbuf, len, offs);
1749 offset = dodynamic(ms, nbuf, offset,
1763 if (bufsize && nbuf[0]) {
1764 nbuf[bufsize - 1] = '\0';
1765 memcpy(interp, nbuf, CAST(size_t, bufsize));
1780 offset = donote(ms, nbuf, offset,