Searched refs:fileSz (Results 1 – 4 of 4) sorted by relevance
/external/honggfuzz/libhfcommon/ |
D | files.c | 68 bool files_writeBufToFile(const char* fileName, const uint8_t* buf, size_t fileSz, int flags) { in files_writeBufToFile() argument 75 bool ret = files_writeToFd(fd, buf, fileSz); in files_writeBufToFile() 77 PLOG_W("Couldn't write '%zu' bytes to file '%s' (fd='%d')", fileSz, fileName, fd); in files_writeBufToFile() 80 LOG_D("Written '%zu' bytes to '%s'", fileSz, fileName); in files_writeBufToFile() 87 int files_writeBufToTmpFile(const char* dir, const uint8_t* buf, size_t fileSz, int flags) { in files_writeBufToTmpFile() argument 98 if (!files_writeToFd(fd, buf, fileSz)) { in files_writeBufToTmpFile() 111 bool files_writeToFd(int fd, const uint8_t* buf, size_t fileSz) { in files_writeToFd() argument 113 while (writtenSz < fileSz) { in files_writeToFd() 114 ssize_t sz = TEMP_FAILURE_RETRY(write(fd, &buf[writtenSz], fileSz - writtenSz)); in files_writeToFd() 127 ssize_t files_readFromFd(int fd, uint8_t* buf, size_t fileSz) { in files_readFromFd() argument [all …]
|
D | files.h | 37 const char* fileName, const uint8_t* buf, size_t fileSz, int flags); 39 int files_writeBufToTmpFile(const char* dir, const uint8_t* buf, size_t fileSz, int flags); 41 extern bool files_writeToFd(int fd, const uint8_t* buf, size_t fileSz); 45 extern ssize_t files_readFromFd(int fd, uint8_t* buf, size_t fileSz); 47 extern ssize_t files_readFromFdSeek(int fd, uint8_t* buf, size_t fileSz, off_t pos); 51 bool files_sendToSocketNB(int fd, const uint8_t* buf, size_t fileSz); 53 bool files_sendToSocket(int fd, const uint8_t* buf, size_t fileSz); 62 extern uint8_t* files_mapFile(const char* fileName, off_t* fileSz, int* fd, bool isWritable); 64 extern uint8_t* files_mapFileShared(const char* fileName, off_t* fileSz, int* fd);
|
/external/honggfuzz/ |
D | cmdline.c | 64 off_t fileSz; in cmdlineCheckBinaryType() local 65 uint8_t* map = files_mapFile(hfuzz->exe.cmdline[0], &fileSz, &fd, /* isWriteable= */ false); in cmdlineCheckBinaryType() 71 if (munmap(map, fileSz) == -1) { in cmdlineCheckBinaryType() 72 PLOG_W("munmap(%p, %zu)", map, (size_t)fileSz); in cmdlineCheckBinaryType() 77 if (memmem(map, fileSz, _HF_PERSISTENT_SIG, strlen(_HF_PERSISTENT_SIG))) { in cmdlineCheckBinaryType() 82 if (memmem(map, fileSz, _HF_NETDRIVER_SIG, strlen(_HF_NETDRIVER_SIG))) { in cmdlineCheckBinaryType()
|
D | input.c | 349 ssize_t fileSz = files_readFileToBufMax(fname, run->dynamicFile, run->global->mutate.maxFileSz); in input_prepareStaticFile() local 350 if (fileSz < 0) { in input_prepareStaticFile() 355 input_setSize(run, fileSz); in input_prepareStaticFile()
|