Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/fio-3.23/arch/arch-aarch64.h Examining data/fio-3.23/arch/arch-alpha.h Examining data/fio-3.23/arch/arch-arm.h Examining data/fio-3.23/arch/arch-generic.h Examining data/fio-3.23/arch/arch-hppa.h Examining data/fio-3.23/arch/arch-ia64.h Examining data/fio-3.23/arch/arch-mips.h Examining data/fio-3.23/arch/arch-ppc.h Examining data/fio-3.23/arch/arch-s390.h Examining data/fio-3.23/arch/arch-sh.h Examining data/fio-3.23/arch/arch-sparc.h Examining data/fio-3.23/arch/arch-sparc64.h Examining data/fio-3.23/arch/arch-x86-common.h Examining data/fio-3.23/arch/arch-x86.h Examining data/fio-3.23/arch/arch-x86_64.h Examining data/fio-3.23/arch/arch.h Examining data/fio-3.23/backend.c Examining data/fio-3.23/blktrace.c Examining data/fio-3.23/blktrace.h Examining data/fio-3.23/blktrace_api.h Examining data/fio-3.23/cairo_text_helpers.c Examining data/fio-3.23/cairo_text_helpers.h Examining data/fio-3.23/cconv.c Examining data/fio-3.23/cgroup.c Examining data/fio-3.23/cgroup.h Examining data/fio-3.23/client.c Examining data/fio-3.23/client.h Examining data/fio-3.23/compiler/compiler.h Examining data/fio-3.23/crc/crc16.c Examining data/fio-3.23/crc/crc16.h Examining data/fio-3.23/crc/crc32.c Examining data/fio-3.23/crc/crc32.h Examining data/fio-3.23/crc/crc32c-arm64.c Examining data/fio-3.23/crc/crc32c-intel.c Examining data/fio-3.23/crc/crc32c.c Examining data/fio-3.23/crc/crc32c.h Examining data/fio-3.23/crc/crc64.c Examining data/fio-3.23/crc/crc64.h Examining data/fio-3.23/crc/crc7.c Examining data/fio-3.23/crc/crc7.h Examining data/fio-3.23/crc/fnv.c Examining data/fio-3.23/crc/fnv.h Examining data/fio-3.23/crc/md5.c Examining data/fio-3.23/crc/md5.h Examining data/fio-3.23/crc/murmur3.c Examining data/fio-3.23/crc/murmur3.h Examining data/fio-3.23/crc/sha1.c Examining data/fio-3.23/crc/sha1.h Examining data/fio-3.23/crc/sha256.c Examining data/fio-3.23/crc/sha256.h Examining data/fio-3.23/crc/sha3.c Examining data/fio-3.23/crc/sha3.h Examining data/fio-3.23/crc/sha512.c Examining data/fio-3.23/crc/sha512.h Examining data/fio-3.23/crc/test.c Examining data/fio-3.23/crc/test.h Examining data/fio-3.23/crc/xxhash.c Examining data/fio-3.23/crc/xxhash.h Examining data/fio-3.23/debug.c Examining data/fio-3.23/debug.h Examining data/fio-3.23/diskutil.c Examining data/fio-3.23/diskutil.h Examining data/fio-3.23/engines/cpu.c Examining data/fio-3.23/engines/dev-dax.c Examining data/fio-3.23/engines/e4defrag.c Examining data/fio-3.23/engines/falloc.c Examining data/fio-3.23/engines/filecreate.c Examining data/fio-3.23/engines/filestat.c Examining data/fio-3.23/engines/ftruncate.c Examining data/fio-3.23/engines/gfapi.h Examining data/fio-3.23/engines/glusterfs.c Examining data/fio-3.23/engines/glusterfs_async.c Examining data/fio-3.23/engines/glusterfs_sync.c Examining data/fio-3.23/engines/guasi.c Examining data/fio-3.23/engines/http.c Examining data/fio-3.23/engines/ime.c Examining data/fio-3.23/engines/io_uring.c Examining data/fio-3.23/engines/libaio.c Examining data/fio-3.23/engines/libhdfs.c Examining data/fio-3.23/engines/libiscsi.c Examining data/fio-3.23/engines/libpmem.c Examining data/fio-3.23/engines/libzbc.c Examining data/fio-3.23/engines/mmap.c Examining data/fio-3.23/engines/mtd.c Examining data/fio-3.23/engines/nbd.c Examining data/fio-3.23/engines/net.c Examining data/fio-3.23/engines/null.c Examining data/fio-3.23/engines/pmemblk.c Examining data/fio-3.23/engines/posixaio.c Examining data/fio-3.23/engines/rados.c Examining data/fio-3.23/engines/rbd.c Examining data/fio-3.23/engines/rdma.c Examining data/fio-3.23/engines/sg.c Examining data/fio-3.23/engines/skeleton_external.c Examining data/fio-3.23/engines/solarisaio.c Examining data/fio-3.23/engines/splice.c Examining data/fio-3.23/engines/sync.c Examining data/fio-3.23/engines/windowsaio.c Examining data/fio-3.23/err.h Examining data/fio-3.23/eta.c Examining data/fio-3.23/exp/test-expression-parser.c Examining data/fio-3.23/fifo.c Examining data/fio-3.23/fifo.h Examining data/fio-3.23/file.h Examining data/fio-3.23/filehash.c Examining data/fio-3.23/filehash.h Examining data/fio-3.23/filelock.c Examining data/fio-3.23/filelock.h Examining data/fio-3.23/filesetup.c Examining data/fio-3.23/fio.c Examining data/fio-3.23/fio.h Examining data/fio-3.23/fio_sem.c Examining data/fio-3.23/fio_sem.h Examining data/fio-3.23/fio_time.h Examining data/fio-3.23/flist.h Examining data/fio-3.23/flow.c Examining data/fio-3.23/flow.h Examining data/fio-3.23/gclient.c Examining data/fio-3.23/gclient.h Examining data/fio-3.23/gcompat.c Examining data/fio-3.23/gcompat.h Examining data/fio-3.23/gerror.c Examining data/fio-3.23/gerror.h Examining data/fio-3.23/gettime-thread.c Examining data/fio-3.23/gettime.c Examining data/fio-3.23/gettime.h Examining data/fio-3.23/gfio.c Examining data/fio-3.23/gfio.h Examining data/fio-3.23/ghelpers.c Examining data/fio-3.23/ghelpers.h Examining data/fio-3.23/goptions.c Examining data/fio-3.23/goptions.h Examining data/fio-3.23/graph.c Examining data/fio-3.23/graph.h Examining data/fio-3.23/hash.h Examining data/fio-3.23/helper_thread.c Examining data/fio-3.23/helper_thread.h Examining data/fio-3.23/helpers.c Examining data/fio-3.23/helpers.h Examining data/fio-3.23/idletime.c Examining data/fio-3.23/idletime.h Examining data/fio-3.23/init.c Examining data/fio-3.23/io_ddir.h Examining data/fio-3.23/io_u.c Examining data/fio-3.23/io_u.h Examining data/fio-3.23/io_u_queue.c Examining data/fio-3.23/io_u_queue.h Examining data/fio-3.23/ioengines.c Examining data/fio-3.23/ioengines.h Examining data/fio-3.23/iolog.c Examining data/fio-3.23/iolog.h Examining data/fio-3.23/json.c Examining data/fio-3.23/json.h Examining data/fio-3.23/lib/axmap.c Examining data/fio-3.23/lib/axmap.h Examining data/fio-3.23/lib/bloom.c Examining data/fio-3.23/lib/bloom.h Examining data/fio-3.23/lib/bswap.h Examining data/fio-3.23/lib/ffz.h Examining data/fio-3.23/lib/flist_sort.c Examining data/fio-3.23/lib/fls.h Examining data/fio-3.23/lib/gauss.c Examining data/fio-3.23/lib/gauss.h Examining data/fio-3.23/lib/getrusage.c Examining data/fio-3.23/lib/getrusage.h Examining data/fio-3.23/lib/hweight.c Examining data/fio-3.23/lib/hweight.h Examining data/fio-3.23/lib/ieee754.c Examining data/fio-3.23/lib/ieee754.h Examining data/fio-3.23/lib/lfsr.c Examining data/fio-3.23/lib/lfsr.h Examining data/fio-3.23/lib/memalign.c Examining data/fio-3.23/lib/memalign.h Examining data/fio-3.23/lib/memcpy.c Examining data/fio-3.23/lib/memcpy.h Examining data/fio-3.23/lib/mountcheck.c Examining data/fio-3.23/lib/mountcheck.h Examining data/fio-3.23/lib/nowarn_snprintf.h Examining data/fio-3.23/lib/num2str.c Examining data/fio-3.23/lib/num2str.h Examining data/fio-3.23/lib/output_buffer.c Examining data/fio-3.23/lib/output_buffer.h Examining data/fio-3.23/lib/pattern.c Examining data/fio-3.23/lib/pattern.h Examining data/fio-3.23/lib/pow2.h Examining data/fio-3.23/lib/prio_tree.c Examining data/fio-3.23/lib/prio_tree.h Examining data/fio-3.23/lib/rand.c Examining data/fio-3.23/lib/rand.h Examining data/fio-3.23/lib/rbtree.c Examining data/fio-3.23/lib/rbtree.h Examining data/fio-3.23/lib/roundup.h Examining data/fio-3.23/lib/seqlock.h Examining data/fio-3.23/lib/strntol.c Examining data/fio-3.23/lib/strntol.h Examining data/fio-3.23/lib/types.h Examining data/fio-3.23/lib/zipf.c Examining data/fio-3.23/lib/zipf.h Examining data/fio-3.23/libfio.c Examining data/fio-3.23/log.c Examining data/fio-3.23/log.h Examining data/fio-3.23/memory.c Examining data/fio-3.23/minmax.h Examining data/fio-3.23/optgroup.c Examining data/fio-3.23/optgroup.h Examining data/fio-3.23/options.c Examining data/fio-3.23/options.h Examining data/fio-3.23/os/kcompat.h Examining data/fio-3.23/os/linux/io_uring.h Examining data/fio-3.23/os/os-aix.h Examining data/fio-3.23/os/os-android.h Examining data/fio-3.23/os/os-dragonfly.h Examining data/fio-3.23/os/os-freebsd.h Examining data/fio-3.23/os/os-hpux.h Examining data/fio-3.23/os/os-linux-syscall.h Examining data/fio-3.23/os/os-linux.h Examining data/fio-3.23/os/os-mac.h Examining data/fio-3.23/os/os-netbsd.h Examining data/fio-3.23/os/os-openbsd.h Examining data/fio-3.23/os/os-solaris.h Examining data/fio-3.23/os/os-windows-7.h Examining data/fio-3.23/os/os-windows-xp.h Examining data/fio-3.23/os/os-windows.h Examining data/fio-3.23/os/os.h Examining data/fio-3.23/os/windows/cpu-affinity.c Examining data/fio-3.23/os/windows/posix.c Examining data/fio-3.23/os/windows/posix.h Examining data/fio-3.23/os/windows/posix/include/arpa/inet.h Examining data/fio-3.23/os/windows/posix/include/asm/types.h Examining data/fio-3.23/os/windows/posix/include/dirent.h Examining data/fio-3.23/os/windows/posix/include/dlfcn.h Examining data/fio-3.23/os/windows/posix/include/libgen.h Examining data/fio-3.23/os/windows/posix/include/netdb.h Examining data/fio-3.23/os/windows/posix/include/netinet/in.h Examining data/fio-3.23/os/windows/posix/include/netinet/tcp.h Examining data/fio-3.23/os/windows/posix/include/poll.h Examining data/fio-3.23/os/windows/posix/include/semaphore.h Examining data/fio-3.23/os/windows/posix/include/sys/ioctl.h Examining data/fio-3.23/os/windows/posix/include/sys/ipc.h Examining data/fio-3.23/os/windows/posix/include/sys/mman.h Examining data/fio-3.23/os/windows/posix/include/sys/resource.h Examining data/fio-3.23/os/windows/posix/include/sys/shm.h Examining data/fio-3.23/os/windows/posix/include/sys/socket.h Examining data/fio-3.23/os/windows/posix/include/sys/uio.h Examining data/fio-3.23/os/windows/posix/include/sys/un.h Examining data/fio-3.23/os/windows/posix/include/sys/wait.h Examining data/fio-3.23/os/windows/posix/include/syslog.h Examining data/fio-3.23/oslib/asprintf.c Examining data/fio-3.23/oslib/asprintf.h Examining data/fio-3.23/oslib/blkzoned.h Examining data/fio-3.23/oslib/getopt.h Examining data/fio-3.23/oslib/getopt_long.c Examining data/fio-3.23/oslib/inet_aton.c Examining data/fio-3.23/oslib/inet_aton.h Examining data/fio-3.23/oslib/libmtd.c Examining data/fio-3.23/oslib/libmtd.h Examining data/fio-3.23/oslib/libmtd_common.h Examining data/fio-3.23/oslib/libmtd_int.h Examining data/fio-3.23/oslib/libmtd_legacy.c Examining data/fio-3.23/oslib/libmtd_xalloc.h Examining data/fio-3.23/oslib/linux-blkzoned.c Examining data/fio-3.23/oslib/linux-dev-lookup.c Examining data/fio-3.23/oslib/linux-dev-lookup.h Examining data/fio-3.23/oslib/statx.c Examining data/fio-3.23/oslib/statx.h Examining data/fio-3.23/oslib/strcasestr.c Examining data/fio-3.23/oslib/strcasestr.h Examining data/fio-3.23/oslib/strlcat.c Examining data/fio-3.23/oslib/strlcat.h Examining data/fio-3.23/oslib/strndup.c Examining data/fio-3.23/oslib/strndup.h Examining data/fio-3.23/oslib/strsep.c Examining data/fio-3.23/oslib/strsep.h Examining data/fio-3.23/parse.c Examining data/fio-3.23/parse.h Examining data/fio-3.23/printing.c Examining data/fio-3.23/printing.h Examining data/fio-3.23/profile.c Examining data/fio-3.23/profile.h Examining data/fio-3.23/profiles/act.c Examining data/fio-3.23/profiles/tiobench.c Examining data/fio-3.23/pshared.c Examining data/fio-3.23/pshared.h Examining data/fio-3.23/rate-submit.c Examining data/fio-3.23/rate-submit.h Examining data/fio-3.23/rwlock.c Examining data/fio-3.23/rwlock.h Examining data/fio-3.23/server.c Examining data/fio-3.23/server.h Examining data/fio-3.23/smalloc.c Examining data/fio-3.23/smalloc.h Examining data/fio-3.23/stat.c Examining data/fio-3.23/stat.h Examining data/fio-3.23/steadystate.c Examining data/fio-3.23/steadystate.h Examining data/fio-3.23/t/arch.c Examining data/fio-3.23/t/axmap.c Examining data/fio-3.23/t/btrace2fio.c Examining data/fio-3.23/t/debug.c Examining data/fio-3.23/t/debug.h Examining data/fio-3.23/t/dedupe.c Examining data/fio-3.23/t/gen-rand.c Examining data/fio-3.23/t/genzipf.c Examining data/fio-3.23/t/ieee754.c Examining data/fio-3.23/t/io_uring.c Examining data/fio-3.23/t/lfsr-test.c Examining data/fio-3.23/t/log.c Examining data/fio-3.23/t/memlock.c Examining data/fio-3.23/t/read-to-pipe-async.c Examining data/fio-3.23/t/stest.c Examining data/fio-3.23/t/time-test.c Examining data/fio-3.23/t/verify-state.c Examining data/fio-3.23/td_error.c Examining data/fio-3.23/td_error.h Examining data/fio-3.23/thread_options.h Examining data/fio-3.23/tickmarks.c Examining data/fio-3.23/tickmarks.h Examining data/fio-3.23/time.c Examining data/fio-3.23/trim.c Examining data/fio-3.23/trim.h Examining data/fio-3.23/unittests/lib/memalign.c Examining data/fio-3.23/unittests/lib/num2str.c Examining data/fio-3.23/unittests/lib/strntol.c Examining data/fio-3.23/unittests/oslib/strcasestr.c Examining data/fio-3.23/unittests/oslib/strlcat.c Examining data/fio-3.23/unittests/oslib/strndup.c Examining data/fio-3.23/unittests/oslib/strsep.c Examining data/fio-3.23/unittests/unittest.c Examining data/fio-3.23/unittests/unittest.h Examining data/fio-3.23/verify-state.h Examining data/fio-3.23/verify.c Examining data/fio-3.23/verify.h Examining data/fio-3.23/workqueue.c Examining data/fio-3.23/workqueue.h Examining data/fio-3.23/zbd.c Examining data/fio-3.23/zbd.h Examining data/fio-3.23/zbd_types.h Examining data/fio-3.23/zone-dist.c Examining data/fio-3.23/zone-dist.h FINAL RESULTS: data/fio-3.23/diskutil.c:250:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. linklen = readlink(temppath, slavepath, PATH_MAX - 1); data/fio-3.23/oslib/linux-blkzoned.c:74:7: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. sz = readlink(sys_devno_path, sys_path, sizeof(sys_path) - 1); data/fio-3.23/backend.c:1353:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/queue/scheduler", td->files[0]->du->sysfs_root); data/fio-3.23/backend.c:1404:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp2, "[%s]", td->o.ioscheduler); data/fio-3.23/backend.c:1468:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s > %s.%s.txt 2>&1", string, o->name, mode); data/fio-3.23/backend.c:1471:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system(str); data/fio-3.23/backend.c:2087:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ret = system(cmd); data/fio-3.23/backend.c:2123:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prefix, "%s%clocal", aux_path, data/fio-3.23/cgroup.c:119:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s/%s", mnt->path, td->o.cgroup); data/fio-3.23/cgroup.c:121:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s/%s", mnt->path, td->o.name); data/fio-3.23/cgroup.c:133:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/%s", path, filename); data/fio-3.23/client.c:712:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *) cslp->text, client->argv[i]); data/fio-3.23/client.c:798:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *) pdu->file, filename); data/fio-3.23/client.c:1302:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *) dst->run_str, (char *) je->run_str); data/fio-3.23/client.c:1436:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(log_pathname, "%s.%s", pdu->name, client->hostname); data/fio-3.23/client.c:1877:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, aux_path); data/fio-3.23/debug.h:60:70: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void __dprint(int type, const char *str, ...) __attribute__((format (printf, 2, 3))); data/fio-3.23/diskutil.c:234:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(slavesdir, "%s/%s", path, "slaves"); data/fio-3.23/diskutil.c:260:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(temppath, F_OK) != 0) data/fio-3.23/diskutil.c:382:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(full_path, "%s/%s", path, dir->d_name); data/fio-3.23/diskutil.c:408:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, full_path); data/fio-3.23/diskutil.c:430:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/../queue", path); data/fio-3.23/diskutil.c:433:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s/queue", p); data/fio-3.23/diskutil.c:439:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s", tmp); data/fio-3.23/engines/e4defrag.c:88:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len = sprintf(donor_name, "%s/", td->o.directory); data/fio-3.23/engines/e4defrag.c:89:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(donor_name + len, "%s", o->donor_name); data/fio-3.23/engines/guasi.c:28:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define GDBG_PRINT(a) printf a data/fio-3.23/engines/pmemblk.c:178:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, pathspec); data/fio-3.23/engines/rados.c:152:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(client_name, o->client_name); data/fio-3.23/engines/rbd.c:185:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(client_name, o->client_name); data/fio-3.23/engines/windowsaio.c:186:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. DWORD access; data/fio-3.23/engines/windowsaio.c:243:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. f->hFile = CreateFile(f->file_name, access, sharemode, data/fio-3.23/eta.c:624:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. p += sprintf(p, ", %s-%s", mr, tr); data/fio-3.23/eta.c:675:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. p += sprintf(p, "%*s", linelen_last - linelen, ""); data/fio-3.23/filesetup.c:930:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s", path); data/fio-3.23/filesetup.c:1658:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file_name + len, "%s", fname); data/fio-3.23/filesetup.c:1852:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(full_path, "%s%c%s", dirname, FIO_OS_PATH_SEPARATOR, dir->d_name); data/fio-3.23/gclient.c:129:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(timebuf, "%s.%03ld", tmp, (long) p->log_usec / 1000); data/fio-3.23/gclient.c:422:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, " - %s", eta_str); data/fio-3.23/gclient.c:506:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dst, " - %s", eta_str); data/fio-3.23/gclient.c:587:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s %s", o->odirect ? "direct" : "buffered", ddir_str(o->td_ddir)); data/fio-3.23/gclient.c:596:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s-%s,%s-%s", c1, c2, c3, c4); data/fio-3.23/gclient.c:638:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "Client %s: timeout talking to server.\n", client->hostname); data/fio-3.23/gclient.c:1006:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s %s", name, base); data/fio-3.23/gclient.c:1130:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s latency percentiles (%s)", type, base); data/fio-3.23/gclient.c:1243:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "Bandwidth (%s)", bw_str); data/fio-3.23/init.c:1249:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s.%d.%d", jobname, jobnum, filenum); data/fio-3.23/init.c:1778:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(jobname, "%s", o[i] + 5); data/fio-3.23/init.c:2011:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename, F_OK) && data/fio-3.23/init.c:2774:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (0 == access(optarg, R_OK)) { data/fio-3.23/init.c:2790:12: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. while (fscanf(hostf, formatstr, hostaddr) == 1) { data/fio-3.23/ioengines.c:84:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(engine_path, "%s/lib%s.so", FIO_EXT_ENG_DIR, engine); data/fio-3.23/lib/nowarn_snprintf.h:18:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. res = vsnprintf(str, size, format, args); data/fio-3.23/lib/pattern.c:186:4: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(beg, fmt, &out[i]); data/fio-3.23/memory.c:140:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(td->o.mmapfile, F_OK) == 0) data/fio-3.23/options.c:4960:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "which %s > /dev/null", BC_APP); data/fio-3.23/options.c:4961:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(buf)) { data/fio-3.23/options.c:4966:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "echo '%s' | %s", tmp, BC_APP); data/fio-3.23/options.c:4967:6: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. f = popen(buf, "r"); data/fio-3.23/options.c:5060:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len = sprintf(new + olen, "%s", kw->replace); data/fio-3.23/os/windows/posix.c:463:6: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. void syslog(int priority, const char *message, ... /* argument */) data/fio-3.23/os/windows/posix.c:484:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(output, message, v); data/fio-3.23/os/windows/posix.c:1008:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(de.d_name, sizeof(de.d_name), find_data.cFileName); data/fio-3.23/os/windows/posix/include/syslog.h:4:5: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. int syslog(); data/fio-3.23/oslib/asprintf.c:17:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(NULL, 0, fmt, ap_copy); data/fio-3.23/oslib/asprintf.c:26:15: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. return str ? vsnprintf(str, len, fmt, ap) : -1; data/fio-3.23/oslib/libmtd.c:170:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, lib->mtd_dev, mtd_num); data/fio-3.23/oslib/libmtd.c:188:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, patt, mtd_num); data/fio-3.23/oslib/libmtd.c:361:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, patt, mtd_num); data/fio-3.23/oslib/libmtd.c:377:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, patt, mtd_num); data/fio-3.23/oslib/libmtd.c:393:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, patt, mtd_num); data/fio-3.23/oslib/libmtd.c:529:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. ret = sscanf(dirent->d_name, MTD_NAME_PATT"%s", data/fio-3.23/oslib/libmtd.c:544:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, lib->mtd_name, num); data/fio-3.23/oslib/libmtd.c:657:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(file, lib->mtd, mtd_num); data/fio-3.23/oslib/libmtd.c:705:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. ret = sscanf(dirent->d_name, MTD_NAME_PATT"%s", data/fio-3.23/oslib/libmtd_common.h:83:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(fmt, ##__VA_ARGS__); \ data/fio-3.23/oslib/libmtd_common.h:90:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("%s: " fmt, PROGRAM_NAME, ##__VA_ARGS__); \ data/fio-3.23/oslib/libmtd_legacy.c:117:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. ret = sscanf(pi->next, PROC_MTD_PATT, &pi->mtd_num, &pi->size, data/fio-3.23/oslib/libmtd_legacy.c:356:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *)mtd->name, pi.name); data/fio-3.23/oslib/libmtd_legacy.c:382:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(node, MTD_DEV_PATT, mtd_num); data/fio-3.23/oslib/linux-dev-lookup.c:29:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(full_path, "%s/%s", path, dir->d_name); data/fio-3.23/oslib/linux-dev-lookup.c:39:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, full_path); data/fio-3.23/oslib/linux-dev-lookup.c:53:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, redirect); data/fio-3.23/oslib/linux-dev-lookup.c:59:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, full_path); data/fio-3.23/parse.c:1272:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. p += sprintf(p, "%s", " "); data/fio-3.23/parse.c:1274:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s", o->name); data/fio-3.23/profiles/act.c:170:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buffer, sizeof(buffer), str, args); data/fio-3.23/profiles/tiobench.c:107:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dir_idx, "directory=%s", dir); data/fio-3.23/server.c:865:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(me, (char *) pdu->server); data/fio-3.23/server.c:2262:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(p, port); data/fio-3.23/smalloc.c:578:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ptr, str); data/fio-3.23/stat.c:535:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prio_name, "high prio (%.2f%%) %s", data/fio-3.23/stat.c:543:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prio_name, "low prio (%.2f%%) %s", data/fio-3.23/t/log.c:12:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buffer, sizeof(buffer), format, args); data/fio-3.23/t/log.c:26:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buffer, sizeof(buffer), format, args); data/fio-3.23/t/time-test.c:88:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define dprintf(...) if (DEBUG) { printf(__VA_ARGS__); } data/fio-3.23/tickmarks.c:114:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf((*tm)[i].string, str, x); data/fio-3.23/verify.c:1722:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(prefix, "%s%clocal", aux_path, FIO_OS_PATH_SEPARATOR); data/fio-3.23/engines/dev-dax.c:284:10: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. rpath = realpath(spath, npath); data/fio-3.23/engines/filestat.c:98:13: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. abspath = realpath(f->file_name, NULL); data/fio-3.23/libfio.c:417:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("LC_NUMERIC")) data/fio-3.23/options.c:5015:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv(ch1); data/fio-3.23/os/windows/posix.c:257:9: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. hMod = LoadLibrary(file); data/fio-3.23/stat.c:2368:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. temp_dir = getenv("TMPDIR"); data/fio-3.23/stat.c:2370:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. temp_dir = getenv("TEMP"); data/fio-3.23/t/btrace2fio.c:1102:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "t:n:fd:r:RD:c:u:x:a:")) != -1) { data/fio-3.23/t/dedupe.c:539:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "b:t:d:o:c:p:B:")) != -1) { data/fio-3.23/t/genzipf.c:109:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, optstring)) != -1) { data/fio-3.23/t/io_uring.c:197:6: [3] (random) lrand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. r = lrand48(); data/fio-3.23/t/io_uring.c:538:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "d:s:c:b:p:B:F:h?")) != -1) { data/fio-3.23/t/read-to-pipe-async.c:523:14: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "f:b:t:w:")) != -1) { data/fio-3.23/t/stest.c:35:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(MAGIC1); data/fio-3.23/arch/arch-x86-common.h:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[13]; data/fio-3.23/backend.c:218:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->lastrate[ddir], now, sizeof(*now)); data/fio-3.23/backend.c:1345:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256], tmp2[128], *p; data/fio-3.23/backend.c:1355:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(tmp, "r+"); data/fio-3.23/backend.c:1747:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->bw_sample_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/backend.c:1748:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->iops_sample_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/backend.c:1749:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->ss.prev_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/backend.c:1753:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->lastrate[DDIR_READ], &td->bw_sample_time, data/fio-3.23/backend.c:1755:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->lastrate[DDIR_WRITE], &td->bw_sample_time, data/fio-3.23/backend.c:1757:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->lastrate[DDIR_TRIM], &td->bw_sample_time, data/fio-3.23/backend.c:1768:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->ts_cache, &td->start, sizeof(td->start)); data/fio-3.23/backend.c:2120:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[PATH_MAX]; data/fio-3.23/backend.c:2126:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(prefix, "local"); data/fio-3.23/blktrace.c:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TRACE_FIFO_SIZE]; data/fio-3.23/blktrace.c:83:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/fio-3.23/blktrace.c:139:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dev[256]; data/fio-3.23/blktrace.c:157:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dev, "/dev"); data/fio-3.23/blktrace.c:453:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/fio-3.23/blktrace.c:720:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). merge_fp = fopen(td->o.merge_blktrace_file, "w"); data/fio-3.23/blktrace.c:732:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bcs[i].fd = open(name, O_RDONLY); data/fio-3.23/blktrace_api.h:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32]; /* output */ data/fio-3.23/cconv.c:172:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(o->verify_pattern, top->verify_pattern, MAX_PATTERN_SIZE); data/fio-3.23/cconv.c:173:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(o->buffer_pattern, top->buffer_pattern, MAX_PATTERN_SIZE); data/fio-3.23/cconv.c:551:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(top->verify_pattern, o->verify_pattern, MAX_PATTERN_SIZE); data/fio-3.23/cconv.c:552:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(top->buffer_pattern, o->buffer_pattern, MAX_PATTERN_SIZE); data/fio-3.23/cgroup.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256] = {0}; data/fio-3.23/cgroup.c:130:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[256]; data/fio-3.23/cgroup.c:134:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(tmp, "w"); data/fio-3.23/client.c:143:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[OPT_LEN_MAX+1], *sub; data/fio-3.23/client.c:163:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, sub, len); data/fio-3.23/client.c:177:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char time_buf[32]; data/fio-3.23/client.c:512:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/fio-3.23/client.c:824:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/fio-3.23/client.c:1124:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(client_ts.name, "All clients"); data/fio-3.23/client.c:1443:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open((const char *) log_pathname, data/fio-3.23/client.c:1465:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen((const char *) log_pathname, "w"); data/fio-3.23/client.c:1498:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bit[16]; data/fio-3.23/client.c:1508:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(bit, "%d-bit", probe->bpp * 8); data/fio-3.23/client.c:1598:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ret, pdu, sizeof(*pdu)); data/fio-3.23/client.c:1746:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open((char *)pdu->path, O_RDONLY); data/fio-3.23/client.c:1873:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/fio-3.23/client.c:1924:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdu->cmd, cmd, slen); data/fio-3.23/client.c:2108:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&eta_ts, &ts, sizeof(ts)); data/fio-3.23/crc/crc7.c:11:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char crc7_syndrome_table[256] = { data/fio-3.23/crc/crc7.h:4:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const unsigned char crc7_syndrome_table[256]; data/fio-3.23/crc/md5.c:106:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data/fio-3.23/crc/md5.c:111:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data/fio-3.23/crc/md5.c:125:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mctx->block, data, len); data/fio-3.23/crc/sha1.c:41:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lenW + (char *)ctx->W, data, left); data/fio-3.23/crc/sha1.c:55:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->W, data, len); data/fio-3.23/crc/sha1.c:60:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char pad[64] = { 0x80 }; data/fio-3.23/crc/sha256.c:256:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sctx->buf + partial, data, done + 64); data/fio-3.23/crc/sha256.c:268:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sctx->buf + partial, src, len - done); data/fio-3.23/crc/sha3.c:131:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sctx->buf + sctx->partial, data, data/fio-3.23/crc/sha3.c:149:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sctx->buf + sctx->partial, src, len - done); data/fio-3.23/crc/sha3.c:171:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sctx->sha, sctx->st, sctx->md_len); data/fio-3.23/crc/sha512.c:181:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sctx->buf[idx], data, part_len); data/fio-3.23/crc/sha512.c:193:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sctx->buf[idx], &data[i], len - i); data/fio-3.23/crc/test.c:399:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pre[3]; data/fio-3.23/crc/test.c:423:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pre, "\t\t"); data/fio-3.23/crc/xxhash.c:299:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->memory + state->memsize, input, len); data/fio-3.23/crc/xxhash.c:306:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->memory + state->memsize, input, 16-state->memsize); data/fio-3.23/crc/xxhash.c:342:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->memory, p, bEnd-p); data/fio-3.23/crc/xxhash.h:77:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char memory[16]; data/fio-3.23/diskutil.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/fio-3.23/diskutil.c:56:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(du->path, "r"); data/fio-3.23/diskutil.c:113:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&du->time, &t, sizeof(t)); data/fio-3.23/diskutil.c:114:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ldus->s, &__dus.s, sizeof(__dus.s)); data/fio-3.23/diskutil.c:163:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tempname[PATH_MAX], *p; data/fio-3.23/diskutil.c:203:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256], *p; data/fio-3.23/diskutil.c:206:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "r"); data/fio-3.23/diskutil.c:229:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char slavesdir[PATH_MAX], temppath[PATH_MAX], slavepath[PATH_MAX]; data/fio-3.23/diskutil.c:377:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char full_path[257]; data/fio-3.23/diskutil.c:422:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[PATH_MAX]; data/fio-3.23/diskutil.c:449:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char foo[PATH_MAX]; data/fio-3.23/diskutil.c:475:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(foo, "/sys/block"); data/fio-3.23/diskutil.h:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/fio-3.23/engines/dev-dax.c:193:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io_u->xfer_buf, io_u->mmap_data, io_u->xfer_buflen); data/fio-3.23/engines/dev-dax.c:260:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spath[PATH_MAX]; data/fio-3.23/engines/dev-dax.c:261:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char npath[PATH_MAX]; data/fio-3.23/engines/dev-dax.c:301:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sfile = fopen(spath, "r"); data/fio-3.23/engines/e4defrag.c:73:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char donor_name[PATH_MAX]; data/fio-3.23/engines/e4defrag.c:91:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ed->donor_fd = open(donor_name, O_CREAT|O_WRONLY, 0644); data/fio-3.23/engines/falloc.c:41:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/engines/filecreate.c:36:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f->fd = open(f->file_name, O_CREAT|O_RDWR, 0600); data/fio-3.23/engines/filecreate.c:39:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/engines/filestat.c:114:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/engines/guasi.c:145:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&io_u->issue_time, &now, sizeof(now)); data/fio-3.23/engines/http.c:251:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash[SHA256_DIGEST_LENGTH]; data/fio-3.23/engines/http.c:259:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash[MD5_DIGEST_LENGTH]; data/fio-3.23/engines/http.c:331:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date_short[16]; data/fio-3.23/engines/http.c:332:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date_iso[32]; data/fio-3.23/engines/http.c:333:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char method[8]; data/fio-3.23/engines/http.c:334:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dkey[128]; data/fio-3.23/engines/http.c:335:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char creq[512]; data/fio-3.23/engines/http.c:336:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sts[256]; data/fio-3.23/engines/http.c:337:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[512]; data/fio-3.23/engines/http.c:344:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char md[SHA256_DIGEST_LENGTH]; data/fio-3.23/engines/http.c:355:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(method, "PUT"); data/fio-3.23/engines/http.c:359:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(method, "GET"); data/fio-3.23/engines/http.c:361:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(method, "DELETE"); data/fio-3.23/engines/http.c:418:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[512]; data/fio-3.23/engines/http.c:456:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, &state->buf[state->pos], len); data/fio-3.23/engines/http.c:471:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&state->buf[state->pos], ptr, nmemb); data/fio-3.23/engines/http.c:493:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char object[512]; data/fio-3.23/engines/http.c:494:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char url[1024]; data/fio-3.23/engines/ime.c:144:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static __thread char ime_filename[PATH_MAX]; data/fio-3.23/engines/ime.c:221:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/engines/io_uring.c:426:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&io_u->issue_time, &now, sizeof(now)); data/fio-3.23/engines/libaio.c:304:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&io_u->issue_time, &now, sizeof(now)); data/fio-3.23/engines/libhdfs.c:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[CHUNCK_NAME_LENGTH_MAX]; data/fio-3.23/engines/libhdfs.c:252:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[CHUNCK_NAME_LENGTH_MAX]; data/fio-3.23/engines/libpmem.c:201:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io_u->xfer_buf, io_u->mmap_data, io_u->xfer_buflen); data/fio-3.23/engines/mmap.c:235:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io_u->xfer_buf, io_u->mmap_data, io_u->xfer_buflen); data/fio-3.23/engines/mmap.c:237:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io_u->mmap_data, io_u->xfer_buf, io_u->xfer_buflen); data/fio-3.23/engines/net.c:1038:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[128]; data/fio-3.23/engines/net.c:1096:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, len); data/fio-3.23/engines/rados.c:151:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(client_name, "client."); data/fio-3.23/engines/rbd.c:184:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(client_name, "client."); data/fio-3.23/engines/rdma.c:165:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[64]; data/fio-3.23/engines/rdma.c:832:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&io_u->issue_time, &now, sizeof(now)); data/fio-3.23/engines/rdma.c:1032:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr->sin_addr, hent->h_addr, 4); data/fio-3.23/engines/sg.c:134:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char cdb[16]; // enhanced from 10 to support 16 byte commands data/fio-3.23/engines/sg.c:135:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sb[MAX_SB]; // add sense block to commands data/fio-3.23/engines/sg.c:174:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, &t, sizeof(uint16_t)); data/fio-3.23/engines/sg.c:181:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, &t, sizeof(uint32_t)); data/fio-3.23/engines/sg.c:188:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, &t, sizeof(uint64_t)); data/fio-3.23/engines/sg.c:362:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&io_u->hdr, hdr, sizeof(struct sg_io_hdr)); data/fio-3.23/engines/sg.c:383:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&st->trim_io_us[j]->hdr, hdr, sizeof(struct sg_io_hdr)); data/fio-3.23/engines/sg.c:728:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&st->trim_io_us[i]->issue_time, &now, sizeof(now)); data/fio-3.23/engines/sg.c:754:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char cmd[16]; data/fio-3.23/engines/sg.c:755:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sb[64]; data/fio-3.23/engines/sg.c:756:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[32]; // read capacity return data/fio-3.23/engines/sg.c:763:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(f->file_name, O_RDONLY); data/fio-3.23/engines/sg.c:980:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *msg, msgchunk[MAXMSGCHUNK]; data/fio-3.23/eta.c:15:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char __run_str[REAL_MAX_JOBS + 1]; data/fio-3.23/eta.c:16:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char run_str[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS) + 1]; data/fio-3.23/eta.c:29:25: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. run_str_condensed += sprintf(run_str_condensed, "(%u),", nr); data/fio-3.23/eta.c:131:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "--"); data/fio-3.23/eta.c:145:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. str += sprintf(str, "%02ud:", d); data/fio-3.23/eta.c:149:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. str += sprintf(str, "%02uh:", h); data/fio-3.23/eta.c:151:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. str += sprintf(str, "%02um:", m); data/fio-3.23/eta.c:152:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%02us", s); data/fio-3.23/eta.c:509:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&rate_prev_time, &now, sizeof(now)); data/fio-3.23/eta.c:523:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&disp_prev_time, &now, sizeof(now)); data/fio-3.23/eta.c:530:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(je->run_str, run_str, strlen(run_str)); data/fio-3.23/eta.c:597:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS) + 512], *p = output; data/fio-3.23/eta.c:598:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char eta_str[128]; data/fio-3.23/eta.c:612:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "Jobs: %d (f=%d)", je->nr_running, je->files_open); data/fio-3.23/eta.c:629:8: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, ", %d-%d IOPS", data/fio-3.23/eta.c:636:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char perc_str[32]; data/fio-3.23/eta.c:637:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *iops_str[DDIR_RWDIR_CNT]; data/fio-3.23/eta.c:638:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *rate_str[DDIR_RWDIR_CNT]; data/fio-3.23/eta.c:646:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(perc_str, "-.-%"); data/fio-3.23/eta.c:655:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(perc_str, "%3.1f%%", perc); data/fio-3.23/exp/test-expression-parser.c:35:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/fio-3.23/fifo.c:58:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fifo->buffer + (fifo->in & (fifo->size - 1)), buffer, l); data/fio-3.23/fifo.c:61:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fifo->buffer, buffer + l, len - l); data/fio-3.23/fifo.c:84:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, fifo->buffer + (fifo->out & (fifo->size - 1)), l); data/fio-3.23/fifo.c:89:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + l, fifo->buffer, len - l); data/fio-3.23/file.h:183:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE_FLAG_FNS(open); data/fio-3.23/filesetup.c:166:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f->fd = open(f->file_name, flags, 0644); data/fio-3.23/filesetup.c:603:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f->fd = open(f->file_name, flags, 0600); data/fio-3.23/filesetup.c:696:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/filesetup.c:793:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char __base[256]; data/fio-3.23/filesetup.c:811:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/fio-3.23/filesetup.c:920:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/fio-3.23/filesetup.c:962:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/fio-3.23/filesetup.c:1648:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file_name[PATH_MAX]; data/fio-3.23/filesetup.c:1838:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FIO_VERROR_SIZE]; data/fio-3.23/filesetup.c:1846:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char full_path[PATH_MAX]; data/fio-3.23/fio.h:455:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char verror[FIO_VERROR_SIZE]; data/fio-3.23/gclient.c:124:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[64], timebuf[96]; data/fio-3.23/gclient.c:181:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[16]; data/fio-3.23/gclient.c:235:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%3.2f%%", util); data/fio-3.23/gclient.c:272:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&gc->du[nr], p, sizeof(*p)); data/fio-3.23/gclient.c:304:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(client_ts.name, "All clients"); data/fio-3.23/gclient.c:318:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char message[100]; data/fio-3.23/gclient.c:330:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char message[100]; data/fio-3.23/gclient.c:347:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char eta_str[128]; data/fio-3.23/gclient.c:348:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output[256]; data/fio-3.23/gclient.c:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/fio-3.23/gclient.c:363:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%u", je->nr_running); data/fio-3.23/gclient.c:365:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%u", je->files_open); data/fio-3.23/gclient.c:369:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *iops_str[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:370:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *rate_str[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:371:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *rate_alt[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:372:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/fio-3.23/gclient.c:376:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(output, "-.-% done"); data/fio-3.23/gclient.c:380:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(output, "%3.1f%% done", perc); data/fio-3.23/gclient.c:436:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char eta_str[128]; data/fio-3.23/gclient.c:437:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output[256]; data/fio-3.23/gclient.c:454:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *iops_str[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:455:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *rate_str[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:456:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *rate_alt[DDIR_RWDIR_CNT]; data/fio-3.23/gclient.c:457:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/fio-3.23/gclient.c:460:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(output, "-.-% done"); data/fio-3.23/gclient.c:464:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(output, "%3.1f%% done", perc); data/fio-3.23/gclient.c:575:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[80]; data/fio-3.23/gclient.c:605:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%u", o->iodepth); data/fio-3.23/gclient.c:631:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/fio-3.23/gclient.c:692:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fbuf[32]; data/fio-3.23/gclient.c:695:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "0.0%%"); data/fio-3.23/gclient.c:697:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "%3.1f%%", io_u_dist[j]); data/fio-3.23/gclient.c:712:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&gc->results[nr].ts, ts, sizeof(*ts)); data/fio-3.23/gclient.c:713:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&gc->results[nr].gs, rs, sizeof(*rs)); data/fio-3.23/gclient.c:737:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fbuf[32]; data/fio-3.23/gclient.c:740:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "0.0%%"); data/fio-3.23/gclient.c:742:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "%3.1f%%", io_u_dist[j]); data/fio-3.23/gclient.c:796:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/fio-3.23/gclient.c:816:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%3.2f%%", usr_cpu); data/fio-3.23/gclient.c:819:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%3.2f%%", sys_cpu); data/fio-3.23/gclient.c:863:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fbuf[32]; data/fio-3.23/gclient.c:866:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "0.00"); data/fio-3.23/gclient.c:868:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "%3.2f%%", lat[i]); data/fio-3.23/gclient.c:996:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[64]; data/fio-3.23/gclient.c:1018:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%5.02f", mean); data/fio-3.23/gclient.c:1021:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%5.02f", dev); data/fio-3.23/gclient.c:1056:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fbuf[8]; data/fio-3.23/gclient.c:1058:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "%2.2f%%", plist[i].u.f); data/fio-3.23/gclient.c:1088:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fbuf[8]; data/fio-3.23/gclient.c:1090:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fbuf, "%2.2f%%", plist[i].u.f); data/fio-3.23/gclient.c:1109:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[64]; data/fio-3.23/gclient.c:1165:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *ddir_label[3] = { "Read", "Write", "Trim" }; data/fio-3.23/gclient.c:1174:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/fio-3.23/gclient.c:1220:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/fio-3.23/gclient.c:1255:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%3.2f%%", p_of_agg); data/fio-3.23/gclient.c:1258:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%5.02f", mean[0]); data/fio-3.23/gclient.c:1261:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%5.02f", dev[0]); data/fio-3.23/gerror.c:42:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/fio-3.23/gfio.c:59:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *tooltiptext[2]; data/fio-3.23/ghelpers.c:89:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[80]; data/fio-3.23/ghelpers.c:91:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%u", val); data/fio-3.23/ghelpers.c:97:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[80]; data/fio-3.23/ghelpers.c:99:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%u", val); data/fio-3.23/goptions.c:1403:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[80]; data/fio-3.23/goptions.c:1405:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "\nCompleted with error: %d\n", gc->update_job_status); data/fio-3.23/helper_thread.c:177:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&last_du, &ts, sizeof(ts)); data/fio-3.23/helper_thread.c:178:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&last_ss, &ts, sizeof(ts)); data/fio-3.23/helper_thread.c:179:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&last_si, &ts, sizeof(ts)); data/fio-3.23/idletime.c:463:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAX_CPU_STR_LEN]; data/fio-3.23/init.c:91:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char cmd_optstr[256]; data/fio-3.23/init.c:1135:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(td->eo, origeo, td->io_ops->option_struct_size); data/fio-3.23/init.c:1245:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char copy[PATH_MAX]; data/fio-3.23/init.c:1420:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[PATH_MAX + 1]; data/fio-3.23/init.c:1423:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char logname[PATH_MAX + 32]; data/fio-3.23/init.c:1497:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(td->ts.percentile_list, o->percentile_list, sizeof(o->percentile_list)); data/fio-3.23/init.c:1768:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char jobname[32]; data/fio-3.23/init.c:1859:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(file, "r"); data/fio-3.23/init.c:2345:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fio_debug_jobno = atoi(opt); data/fio-3.23/init.c:2487:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). smalloc_pool_size = atoi(optarg); data/fio-3.23/init.c:2505:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). tmp = fopen(optarg, "w+"); data/fio-3.23/init.c:2565:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). terse_version = atoi(optarg); data/fio-3.23/init.c:2725:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_jobs = atoi(optarg); data/fio-3.23/init.c:2776:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostaddr[PATH_MAX] = {0}; data/fio-3.23/init.c:2777:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char formatstr[8]; data/fio-3.23/init.c:2778:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * hostf = fopen(optarg, "r"); data/fio-3.23/init.c:2785:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(formatstr, "%%%ds", PATH_MAX - 1); data/fio-3.23/init.c:3016:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(o, &def_thread.o, sizeof(*o)); data/fio-3.23/ioengines.c:81:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char engine_path[PATH_MAX]; data/fio-3.23/ioengines.c:341:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->last_issue, &io_u->issue_time, data/fio-3.23/ioengines.c:427:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->last_issue, &io_u->issue_time, data/fio-3.23/iolog.c:612:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256], *p, *fname; data/fio-3.23/iolog.c:627:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(fname, "r"); data/fio-3.23/iolog.c:668:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(td->o.write_iolog_file, "a"); data/fio-3.23/iolog.c:1120:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(file, "r"); data/fio-3.23/iolog.c:1203:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(log->filename, "w"); data/fio-3.23/iolog.c:1205:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(log->filename, "a"); data/fio-3.23/lib/memcpy.c:109:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. do_test(test, memcpy); data/fio-3.23/lib/memcpy.c:136:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. do_test(test, memcpy); data/fio-3.23/lib/num2str.c:37:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/fio-3.23/lib/num2str.c:73:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%llu", (unsigned long long) num); data/fio-3.23/lib/num2str.c:100:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%llu", (unsigned long long) num); data/fio-3.23/lib/num2str.c:112:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%.*f", (int)(maxlen - strlen(tmp) - 1), data/fio-3.23/lib/output_buffer.c:38:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&out->buf[out->buflen], buf, len); data/fio-3.23/lib/pattern.c:50:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/fio-3.23/lib/pattern.c:103:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, beg, end - beg); data/fio-3.23/lib/pattern.c:392:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out + off, out, len); data/fio-3.23/lib/pattern.c:418:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, pattern, len); data/fio-3.23/lib/pattern.c:523:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out, pattern, len); data/fio-3.23/lib/strntol.c:11:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[24]; data/fio-3.23/lib/strntol.c:25:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, beg, sz); data/fio-3.23/libfio.c:46:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *fio_os_strings[os_nr] = { data/fio-3.23/libfio.c:62:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *fio_arch_strings[arch_nr] = { data/fio-3.23/libfio.c:147:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->start, &td->epoch, sizeof(td->epoch)); data/fio-3.23/libfio.c:148:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->iops_sample_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/libfio.c:149:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->bw_sample_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/libfio.c:150:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->ss.prev_time, &td->epoch, sizeof(td->epoch)); data/fio-3.23/memory.c:143:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). td->mmapfd = open(td->o.mmapfile, O_RDWR|O_CREAT, 0644); data/fio-3.23/memory.c:217:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/fio-3.23/options.c:18:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char client_sockaddr_str[INET6_ADDRSTRLEN] = { 0 }; data/fio-3.23/options.c:89:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). perc = atoi(perc_str); data/fio-3.23/options.c:320:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). error[i] = atoi(fname); data/fio-3.23/options.c:429:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). o->ddir_seq_nr = atoi(nr); data/fio-3.23/options.c:585:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). icpu2 = atoi(cpu2); data/fio-3.23/options.c:588:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). icpu = atoi(cpu); data/fio-3.23/options.c:760:32: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). td->o.numa_mem_prefer_node = atoi(nodelist); data/fio-3.23/options.c:801:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). td->file_service_nr = atoi(nr); data/fio-3.23/options.c:873:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). td->sync_file_range_nr = atoi(nr); data/fio-3.23/options.c:4915:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/fio-3.23/options.c:4918:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%lu", (unsigned long) page_size); data/fio-3.23/options.c:4922:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%llu", mb_memory); data/fio-3.23/options.c:4926:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%lu", l); data/fio-3.23/options.c:4934:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128], *tmp; data/fio-3.23/options.c:4979:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, str, tmp - str); data/fio-3.23/options.c:4992:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out[OPT_LEN_MAX+1]; data/fio-3.23/options.c:4993:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char in[OPT_LEN_MAX+1]; data/fio-3.23/options.c:5019:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outptr, env, envlen); data/fio-3.23/options.c:5059:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new, opt, olen); data/fio-3.23/options.c:5068:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new + olen + len, opt, opt - o_org - 1); data/fio-3.23/options.c:5241:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(td->eo, oldeo, td->io_ops->option_struct_size); data/fio-3.23/options.c:5285:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fio_options[opt_index], o, sizeof(*o)); data/fio-3.23/os/os-android.h:89:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keybuf[11]; data/fio-3.23/os/os-android.h:91:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(ASHMEM_DEVICE, O_RDWR); data/fio-3.23/os/os-android.h:95:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(keybuf,"%d",__key); data/fio-3.23/os/os-android.h:229:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char size[32]; data/fio-3.23/os/os-android.h:232:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(CACHE_LINE_FILE, O_RDONLY); data/fio-3.23/os/os-android.h:243:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(size); data/fio-3.23/os/os-linux.h:186:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/rawctl", O_RDONLY); data/fio-3.23/os/os-linux.h:188:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/raw/rawctl", O_RDONLY); data/fio-3.23/os/os-linux.h:240:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char size[32]; data/fio-3.23/os/os-linux.h:243:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(CACHE_LINE_FILE, O_RDONLY); data/fio-3.23/os/os-linux.h:254:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(size); data/fio-3.23/os/os.h:330:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", O_RDONLY); data/fio-3.23/os/windows/posix.c:638:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char name[MAX_PATH]; data/fio-3.23/os/windows/posix.c:996:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char search_pattern[MAX_PATH]; data/fio-3.23/os/windows/posix.c:1093:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, &si.sin_addr, sizeof(si.sin_addr)); data/fio-3.23/os/windows/posix.c:1102:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, &si6.sin6_addr, sizeof(si6.sin6_addr)); data/fio-3.23/os/windows/posix/include/dirent.h:9:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_name[MAX_PATH]; /* Name of entry */ data/fio-3.23/os/windows/posix/include/dirent.h:15:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dirname[MAX_PATH]; data/fio-3.23/os/windows/posix/include/sys/un.h:10:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sun_path[260]; /* Socket pathname */ data/fio-3.23/oslib/getopt_long.c:160:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. optarg = (char *)argv[optind+1]; data/fio-3.23/oslib/getopt_long.c:168:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. optarg = (char *)argv[optind+1]; data/fio-3.23/oslib/libmtd.c:60:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n, path, len1); data/fio-3.23/oslib/libmtd.c:64:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n + len1, name, len2 + 1); data/fio-3.23/oslib/libmtd.c:82:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY | O_CLOEXEC); data/fio-3.23/oslib/libmtd.c:98:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char *)buf)[rd] = '\0'; data/fio-3.23/oslib/libmtd.c:136:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/fio-3.23/oslib/libmtd.c:168:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(lib->mtd_dev) + 50]; data/fio-3.23/oslib/libmtd.c:186:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(patt) + 100]; data/fio-3.23/oslib/libmtd.c:204:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/fio-3.23/oslib/libmtd.c:206:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY | O_CLOEXEC); data/fio-3.23/oslib/libmtd.c:256:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/fio-3.23/oslib/libmtd.c:258:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY | O_CLOEXEC); data/fio-3.23/oslib/libmtd.c:359:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:375:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:391:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:497:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(lib->mtd_name) + 10]; data/fio-3.23/oslib/libmtd.c:514:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp_buf[256]; data/fio-3.23/oslib/libmtd.c:545:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY | O_CLOEXEC); data/fio-3.23/oslib/libmtd.c:655:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[strlen(lib->mtd) + 10]; data/fio-3.23/oslib/libmtd.c:691:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp_buf[256]; data/fio-3.23/oslib/libmtd.c:1097:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp_buf, oob, ooblen); data/fio-3.23/oslib/libmtd.c:1109:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(oob + start, tmp_buf + tags_pos, len); data/fio-3.23/oslib/libmtd.c:1116:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(oob + start, tmp_buf + start, len); data/fio-3.23/oslib/libmtd.c:1309:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in_fd = open(img_name, O_RDONLY | O_CLOEXEC); data/fio-3.23/oslib/libmtd.h:84:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char type_str[MTD_TYPE_MAX + 1]; data/fio-3.23/oslib/libmtd.h:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MTD_NAME_MAX + 1]; data/fio-3.23/oslib/libmtd_legacy.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MTD_NAME_MAX + 1]; data/fio-3.23/oslib/libmtd_legacy.c:76:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(MTD_PROC_FILE, O_RDONLY); data/fio-3.23/oslib/libmtd_legacy.c:141:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pi->name, p, len); data/fio-3.23/oslib/libmtd_legacy.c:163:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(MTD_PROC_FILE, O_RDONLY); data/fio-3.23/oslib/libmtd_legacy.c:267:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(node, O_RDONLY); data/fio-3.23/oslib/libmtd_legacy.c:316:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "ram"); data/fio-3.23/oslib/libmtd_legacy.c:319:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "rom"); data/fio-3.23/oslib/libmtd_legacy.c:322:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "nor"); data/fio-3.23/oslib/libmtd_legacy.c:325:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "nand"); data/fio-3.23/oslib/libmtd_legacy.c:328:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "mlc-nand"); data/fio-3.23/oslib/libmtd_legacy.c:331:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "dataflash"); data/fio-3.23/oslib/libmtd_legacy.c:334:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)mtd->type_str, "ubi"); data/fio-3.23/oslib/libmtd_legacy.c:380:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char node[sizeof(MTD_DEV_PATT) + 20]; data/fio-3.23/oslib/linux-blkzoned.c:32:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256], *p = line; data/fio-3.23/oslib/linux-blkzoned.c:35:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(path, "rb"); data/fio-3.23/oslib/linux-blkzoned.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sys_path[PATH_MAX]; data/fio-3.23/oslib/linux-blkzoned.c:136:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(f->file_name, O_RDONLY | O_LARGEFILE); data/fio-3.23/oslib/linux-blkzoned.c:230:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(f->file_name, O_RDWR | O_LARGEFILE); data/fio-3.23/oslib/linux-dev-lookup.c:24:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char full_path[257]; data/fio-3.23/parse.c:67:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&vpmap[entries], vp, sizeof(*vp)); data/fio-3.23/parse.c:604:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128], *p; data/fio-3.23/parse.c:832:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[128]; data/fio-3.23/parse.c:1263:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256], *p; data/fio-3.23/printing.c:34:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/fio-3.23/printing.c:49:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "(%g,%g)", x, y); data/fio-3.23/printing.c:60:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "(%g,%g)", x, y); data/fio-3.23/profile.h:18:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32]; data/fio-3.23/profile.h:19:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char desc[64]; data/fio-3.23/profiles/act.c:57:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *act_opts[ACT_MAX_OPTS] = { data/fio-3.23/profiles/act.c:160:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[512]; data/fio-3.23/profiles/tiobench.c:12:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sz_idx[80], bs_idx[80], loop_idx[80], dir_idx[80], t_idx[80]; data/fio-3.23/profiles/tiobench.c:99:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sz_idx, "size=%llu", size); data/fio-3.23/profiles/tiobench.c:101:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(sz_idx, "size=4*1024*$mb_memory"); data/fio-3.23/profiles/tiobench.c:103:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(bs_idx, "bs=%u", bs); data/fio-3.23/profiles/tiobench.c:104:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(loop_idx, "loops=%u", loops); data/fio-3.23/profiles/tiobench.c:109:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dir_idx, "directory=./"); data/fio-3.23/profiles/tiobench.c:111:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(t_idx, "numjobs=%u", nthreads); data/fio-3.23/server.c:62:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char me[128]; data/fio-3.23/server.c:81:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *fio_server_ops[FIO_NET_CMD_NR] = { data/fio-3.23/server.c:182:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cmd->payload, pdu, pdu_len); data/fio-3.23/server.c:187:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[32]; data/fio-3.23/server.c:192:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "UNKNOWN/%d", op); data/fio-3.23/server.c:371:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cmdret, &cmd, sizeof(cmd)); data/fio-3.23/server.c:540:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(entry->buf, buf, size); data/fio-3.23/server.c:1045:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rep->data, in->data, in->size); data/fio-3.23/server.c:1318:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/fio-3.23/server.c:1419:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdu->buf, buf, len); data/fio-3.23/server.c:1596:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ss_buf, &p, sizeof(p)); data/fio-3.23/server.c:1651:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdu.name, p->name, len); data/fio-3.23/server.c:1658:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdu.value, p->value, len); data/fio-3.23/server.c:2131:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, s, rep->size); data/fio-3.23/server.c:2144:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/fio-3.23/server.c:2230:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bind_str[128]; data/fio-3.23/server.c:2246:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *p, port[16]; data/fio-3.23/server.c:2260:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port, ",%u", fio_net_port); data/fio-3.23/server.c:2304:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(inp6, &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr, sizeof(*inp6)); data/fio-3.23/server.c:2306:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(inp, &((struct sockaddr_in *) res->ai_addr)->sin_addr, sizeof(*inp)); data/fio-3.23/server.c:2360:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). lport = atoi(host); data/fio-3.23/server.c:2378:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). lport = atoi(portp); data/fio-3.23/server.c:2523:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/fio-3.23/server.c:2530:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(pidfile, "r"); data/fio-3.23/server.c:2540:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pid = atoi(buf); data/fio-3.23/server.c:2551:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpid = fopen(pidfile, "w"); data/fio-3.23/stat.c:48:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&td->ru_start, &td->ru_end, sizeof(td->ru_end)); data/fio-3.23/stat.c:210:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmt[32]; data/fio-3.23/stat.c:523:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prio_name[32]; data/fio-3.23/stat.c:785:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[LINE_LENGTH]; data/fio-3.23/stat.c:1057:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char time_buf[32]; data/fio-3.23/stat.c:1255:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[120]; data/fio-3.23/stat.c:1573:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[20]; data/fio-3.23/stat.c:1578:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. json_object_add_value_float(tmp, (const char *)name, io_u_dist[i]); data/fio-3.23/stat.c:1587:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[20]; data/fio-3.23/stat.c:1594:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. json_object_add_value_float(tmp, (const char *)name, io_u_dist[i]); data/fio-3.23/stat.c:1603:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[20]; data/fio-3.23/stat.c:1610:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. json_object_add_value_float(tmp, (const char *)name, io_u_dist[i]); data/fio-3.23/stat.c:1682:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/fio-3.23/stat.c:1705:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ss_buf[64]; data/fio-3.23/stat.c:2073:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ts->percentile_list, td->o.percentile_list, sizeof(td->o.percentile_list)); data/fio-3.23/stat.c:2213:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char time_buf[32]; data/fio-3.23/stat.c:2363:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fio_status_file_path[PATH_MAX]; data/fio-3.23/stat.c:2514:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, log_entry_sz(iolog)); data/fio-3.23/stat.c:2860:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(dst->io_u_plat), io_u_plat, data/fio-3.23/stat.h:159:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[FIO_JOBNAME_SIZE]; data/fio-3.23/stat.h:160:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char verror[FIO_VERROR_SIZE]; data/fio-3.23/stat.h:165:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char description[FIO_JOBDESC_SIZE]; data/fio-3.23/steadystate.c:251:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ss->prev_time, &now, sizeof(now)); data/fio-3.23/t/btrace2fio.c:174:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TRACE_FIFO_SIZE]; data/fio-3.23/t/btrace2fio.c:279:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dev[256]; data/fio-3.23/t/btrace2fio.c:299:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(dev, "/dev"); data/fio-3.23/t/btrace2fio.c:487:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, O_RDONLY); data/fio-3.23/t/btrace2fio.c:660:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ios_bak, o->ios, DDIR_RWDIR_CNT * sizeof(unsigned long)); data/fio-3.23/t/btrace2fio.c:1057:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(trace_file, O_RDONLY); data/fio-3.23/t/btrace2fio.c:1108:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rate_threshold = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1111:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rt_threshold = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1114:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ios_threshold = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1123:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_depth = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1126:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). collapse_entries = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1129:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). depth_diff = atoi(optarg); data/fio-3.23/t/btrace2fio.c:1132:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). random_diff = atoi(optarg); data/fio-3.23/t/dedupe.c:228:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(c->hash, i->hash, sizeof(i->hash)); data/fio-3.23/t/dedupe.c:432:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.fd = open(filename, flags); data/fio-3.23/t/dedupe.c:542:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). blocksize = atoi(optarg); data/fio-3.23/t/dedupe.c:545:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num_threads = atoi(optarg); data/fio-3.23/t/dedupe.c:548:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dump_output = atoi(optarg); data/fio-3.23/t/dedupe.c:551:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). odirect = atoi(optarg); data/fio-3.23/t/dedupe.c:554:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). collision_check = atoi(optarg); data/fio-3.23/t/dedupe.c:557:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). print_progress = atoi(optarg); data/fio-3.23/t/dedupe.c:560:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). use_bloom = atoi(optarg); data/fio-3.23/t/io_uring.c:507:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%d", f->pending_ios); data/fio-3.23/t/io_uring.c:509:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. p += sprintf(p, "%d, ", f->pending_ios); data/fio-3.23/t/io_uring.c:541:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). depth = atoi(optarg); data/fio-3.23/t/io_uring.c:544:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). batch_submit = atoi(optarg); data/fio-3.23/t/io_uring.c:547:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). batch_complete = atoi(optarg); data/fio-3.23/t/io_uring.c:550:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bs = atoi(optarg); data/fio-3.23/t/io_uring.c:553:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). polled = !!atoi(optarg); data/fio-3.23/t/io_uring.c:556:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fixedbufs = !!atoi(optarg); data/fio-3.23/t/io_uring.c:559:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). register_files = !!atoi(optarg); data/fio-3.23/t/io_uring.c:585:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(argv[i], flags); data/fio-3.23/t/lfsr-test.c:45:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 4: spin = atoi(argv[3]); data/fio-3.23/t/lfsr-test.c:47:18: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). case 3: seed = atol(argv[2]); data/fio-3.23/t/log.c:7:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/fio-3.23/t/log.c:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/fio-3.23/t/read-to-pipe-async.c:531:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bs = atoi(optarg); data/fio-3.23/t/read-to-pipe-async.c:534:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_us = atoi(optarg); data/fio-3.23/t/read-to-pipe-async.c:537:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). separate_writer = atoi(optarg); data/fio-3.23/t/read-to-pipe-async.c:597:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/fio-3.23/t/verify-state.c:105:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/fio-3.23/thread_options.h:124:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char verify_pattern[MAX_PATTERN_SIZE]; data/fio-3.23/thread_options.h:235:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer_pattern[MAX_PATTERN_SIZE]; data/fio-3.23/tickmarks.c:93:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[100]; data/fio-3.23/tickmarks.h:6:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[20]; data/fio-3.23/time.c:188:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(t, &genesis, sizeof(genesis)); data/fio-3.23/unittests/oslib/strlcat.c:11:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst[32]; data/fio-3.23/unittests/oslib/strlcat.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst[32]; data/fio-3.23/verify-state.h:88:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ename[PATH_MAX]; data/fio-3.23/verify.c:118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char swap[200]; data/fio-3.23/verify.c:122:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&swap, buf1, len); data/fio-3.23/verify.c:123:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf1, buf2, len); data/fio-3.23/verify.c:124:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf2, &swap, len); data/fio-3.23/verify.c:245:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sep[2] = { FIO_OS_PATH_SEPARATOR, 0 }; data/fio-3.23/verify.c:257:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644); data/fio-3.23/verify.c:1524:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, &off, len); data/fio-3.23/verify.c:1645:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out[PATH_MAX]; data/fio-3.23/verify.c:1656:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(out, flags, 0644); data/fio-3.23/verify.c:1719:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[PATH_MAX]; data/fio-3.23/verify.c:1724:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(prefix, "local"); data/fio-3.23/zbd.c:1153:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (z->open) data/fio-3.23/zbd.h:43:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). unsigned int open:1; data/fio-3.23/backend.c:1369:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = fwrite(td->o.ioscheduler, strlen(td->o.ioscheduler), 1, f); data/fio-3.23/backend.c:1463:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 13 + 1; data/fio-3.23/backend.c:1463:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 13 + 1; data/fio-3.23/backend.c:1463:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t newlen = strlen(string) + strlen(o->name) + strlen(mode) + 13 + 1; data/fio-3.23/backend.c:1815:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/fio-3.23/backend.c:2137:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(usecs); data/fio-3.23/blktrace.c:29:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, total); data/fio-3.23/blktrace.c:87:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &t, sizeof(t)); data/fio-3.23/cconv.c:10:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(__src)) data/fio-3.23/client.c:104:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, size); data/fio-3.23/client.c:155:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(sub); data/fio-3.23/client.c:185:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). time_buf[strlen(time_buf) - 1] = '\0'; data/fio-3.23/client.c:589:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr->sun_family) + strlen(addr->sun_path) + 1; data/fio-3.23/client.c:695:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lens[i] = strlen(client->argv[i]) + 1; data/fio-3.23/client.c:794:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p_size = sizeof(*pdu) + strlen(filename) + 1; data/fio-3.23/client.c:797:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pdu->name_len = strlen(filename); data/fio-3.23/client.c:1348:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/fio-3.23/client.c:1428:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). log_pathname = malloc(10 + strlen((char *)pdu->name) + data/fio-3.23/client.c:1429:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(client->hostname)); data/fio-3.23/client.c:1878:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). off = strlen(buf); data/fio-3.23/client.c:1914:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(cmd); data/fio-3.23/crc/test.c:420:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(t[i].name) >= 7) data/fio-3.23/crc/test.c:421:5: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(pre, "\t"); data/fio-3.23/engines/e4defrag.c:75:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!o->donor_name || !strlen(o->donor_name)) { data/fio-3.23/engines/glusterfs_async.c:50:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/fio-3.23/engines/http.c:280:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). HMAC_Update(ctx, (unsigned char*)data, strlen(data)); data/fio-3.23/engines/http.c:379:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). csha = _gen_hex_sha256(creq, strlen(creq)); data/fio-3.23/engines/http.c:384:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _hmac(md, dkey, strlen(dkey), date_short); data/fio-3.23/engines/io_uring.c:479:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1); data/fio-3.23/engines/libaio.c:237:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10); data/fio-3.23/engines/libaio.c:361:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1); data/fio-3.23/engines/net.c:817:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr->sun_family) + strlen(addr->sun_path) + 1; data/fio-3.23/engines/net.c:1135:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode = umask(000); data/fio-3.23/engines/net.c:1141:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr->sun_family) + strlen(path) + 1; data/fio-3.23/engines/net.c:1149:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mode); data/fio-3.23/engines/rados.c:149:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). client_name = calloc(1, strlen("client.") + data/fio-3.23/engines/rados.c:150:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(o->client_name) + 1); data/fio-3.23/engines/rbd.c:182:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). client_name = calloc(1, strlen("client.") + data/fio-3.23/engines/rbd.c:183:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(o->client_name) + 1); data/fio-3.23/engines/rbd.c:393:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(rbd->fd, &counter, sizeof(counter)); data/fio-3.23/engines/rdma.c:915:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/fio-3.23/engines/rdma.c:1054:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (o->bindname && strlen(o->bindname)) { data/fio-3.23/engines/rdma.c:1120:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!o->bindname || !strlen(o->bindname)) data/fio-3.23/engines/rdma.c:1227:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp("rdma_write", modep, strlen(modep)) || data/fio-3.23/engines/rdma.c:1228:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !strncmp("RDMA_WRITE", modep, strlen(modep))) data/fio-3.23/engines/rdma.c:1230:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (!strncmp("rdma_read", modep, strlen(modep)) || data/fio-3.23/engines/rdma.c:1231:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !strncmp("RDMA_READ", modep, strlen(modep))) data/fio-3.23/engines/rdma.c:1233:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (!strncmp("send", modep, strlen(modep)) || data/fio-3.23/engines/rdma.c:1234:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). !strncmp("SEND", modep, strlen(modep))) data/fio-3.23/engines/sg.c:237:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, size); data/fio-3.23/engines/sg.c:348:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/fio-3.23/engines/sg.c:447:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(f->fd, hdr, sizeof(*hdr)); data/fio-3.23/engines/sg.c:984:2: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(msg, ""); data/fio-3.23/engines/sg.c:1183:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(hdr->info & SG_INFO_CHECK) && !strlen(msg)) data/fio-3.23/engines/splice.c:56:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret2 = read(sd->pipe[0], p, ret); data/fio-3.23/engines/sync.c:227:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(f->fd, io_u->xfer_buf, io_u->xfer_buflen); data/fio-3.23/eta.c:530:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(je->run_str, run_str, strlen(run_str)); data/fio-3.23/eta.c:609:8: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. p += sprintf(p, "\n"); data/fio-3.23/eta.c:683:2: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(p, "\r"); data/fio-3.23/eta.c:716:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *size = sizeof(*je) + strlen((char *) je->run_str) + 1; data/fio-3.23/exp/test-expression-parser.c:40:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rc = strlen(buffer); data/fio-3.23/filehash.c:24:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return jhash(name, strlen(name), 0) & HASH_MASK; data/fio-3.23/filehash.c:105:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return bloom_string(file_bloom, fname, strlen(fname), set); data/fio-3.23/filelock.c:62:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/fio-3.23/filelock.c:173:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hash = jhash(fname, strlen(fname), 0); data/fio-3.23/filelock.c:230:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). hash = jhash(fname, strlen(fname), 0); data/fio-3.23/filesetup.c:321:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(f->fd, b, bs); data/fio-3.23/filesetup.c:524:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/fio-3.23/filesetup.c:825:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(buf, "."); data/fio-3.23/filesetup.c:1319:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number; data/fio-3.23/flow.c:39:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(td->o.flow_sleep); data/fio-3.23/gclient.c:420:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *dst = output + strlen(output); data/fio-3.23/gclient.c:504:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *dst = output + strlen(output); data/fio-3.23/gclient.c:1376:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(ts->description)) { data/fio-3.23/goptions.c:851:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while (strlen(postfix[i])) { data/fio-3.23/goptions.c:1520:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!name || !strlen(name)) data/fio-3.23/goptions.c:1560:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!name || !strlen(name)) data/fio-3.23/helper_thread.c:82:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(fd, buf, len); data/fio-3.23/init.c:1232:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t strlen; data/fio-3.23/init.c:1248:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!o->filename_format || !strlen(o->filename_format)) { data/fio-3.23/init.c:1254:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). f->strlen = strlen(f->keyword); data/fio-3.23/init.c:1269:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) != f->strlen) data/fio-3.23/init.c:1269:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) != f->strlen) data/fio-3.23/init.c:1270:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). post_start = pre_len + f->strlen; data/fio-3.23/init.c:1273:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, buf, pre_len); data/fio-3.23/init.c:1333:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, buf + post_start, dst_left); data/fio-3.23/init.c:1818:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(line); i++) { data/fio-3.23/init.c:1928:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name[strlen(name) - 1] = '\0'; data/fio-3.23/init.c:2003:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(p, "include", strlen("include"))) { data/fio-3.23/init.c:2004:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *filename = p + strlen("include") + 1, data/fio-3.23/init.c:2139:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (first || curlen + strlen(dl->name) >= 80) { data/fio-3.23/init.c:2334:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). found = !strncmp(opt, dl->name, strlen(dl->name)); data/fio-3.23/init.c:2683:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((!val || !strlen(val)) && data/fio-3.23/iolog.c:419:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. r = sscanf(p, "%256s %256s %llu %u", rfname, act, &offset, data/fio-3.23/iolog.c:599:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = connect(fd, (const struct sockaddr *)&addr, strlen(path) + sizeof(addr.sun_family)); data/fio-3.23/iolog.c:648:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strncmp(iolog_ver2, buffer, strlen(iolog_ver2))) { data/fio-3.23/iolog.c:1740:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(5000); data/fio-3.23/json.c:59:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(str)) data/fio-3.23/json.c:68:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = ret = malloc(strlen(str) + escapes + 1); data/fio-3.23/lib/num2str.c:74:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) <= maxlen) data/fio-3.23/lib/num2str.c:101:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((int)(maxlen - strlen(tmp)) <= 1) { data/fio-3.23/lib/num2str.c:110:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(maxlen - strlen(tmp) - 1 > 0); data/fio-3.23/lib/num2str.c:112:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(tmp, "%.*f", (int)(maxlen - strlen(tmp) - 1), data/fio-3.23/lib/pattern.c:54:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, out, out_len); data/fio-3.23/lib/pattern.c:240:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(desc->fmt); data/fio-3.23/options.c:75:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(fname)) data/fio-3.23/options.c:306:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(fname)) data/fio-3.23/options.c:576:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(cpu)) data/fio-3.23/options.c:582:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(cpu2)) data/fio-3.23/options.c:980:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(str, pre, strlen(pre))) { data/fio-3.23/options.c:985:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str += strlen(pre); data/fio-3.23/options.c:1168:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!str || !strlen(str)) data/fio-3.23/options.c:1197:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(p - 1, p, strlen(p) + 1); data/fio-3.23/options.c:1283:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(fname)) data/fio-3.23/options.c:1342:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = parse_and_fill_pattern(input, strlen(input), td->o.buffer_pattern, data/fio-3.23/options.c:1391:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = parse_and_fill_pattern(input, strlen(input), td->o.verify_pattern, data/fio-3.23/options.c:4957:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) >= 128 || strlen(tmp) > 100) data/fio-3.23/options.c:4957:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) >= 128 || strlen(tmp) > 100) data/fio-3.23/options.c:5000:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(opt) + 1 > OPT_LEN_MAX) { data/fio-3.23/options.c:5017:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). envlen = strlen(env); data/fio-3.23/options.c:5050:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *new = malloc(strlen(opt) + 1); data/fio-3.23/options.c:5066:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). opt += strlen(kw->word) + olen; data/fio-3.23/options.c:5067:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(opt)) data/fio-3.23/options.c:5108:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(opt)) data/fio-3.23/os/os-android.h:236:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, size, sizeof(size)); data/fio-3.23/os/os-linux.h:247:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, size, sizeof(size)); data/fio-3.23/os/os.h:335:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, rand_seeds, size) < size) { data/fio-3.23/os/windows/posix.c:630:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. int usleep(useconds_t useconds) data/fio-3.23/os/windows/posix.c:641:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (path == NULL || strlen(path) == 0) data/fio-3.23/os/windows/posix.c:644:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = strlen(path) - 1; data/fio-3.23/os/windows/posix.c:650:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, path + i + 1, MAX_PATH - 1); data/fio-3.23/os/windows/posix.c:828:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(fildes, buf, nbyte); data/fio-3.23/oslib/getopt_long.c:141:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((uintptr_t) (pvt.optptr - carg) > (uintptr_t) strlen(carg)) { data/fio-3.23/oslib/libmtd.c:55:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len1 = strlen(path); data/fio-3.23/oslib/libmtd.c:56:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len2 = strlen(name); data/fio-3.23/oslib/libmtd.c:86:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd, buf, buf_len); data/fio-3.23/oslib/libmtd.c:101:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tmp1 = read(fd, &tmp, 1); data/fio-3.23/oslib/libmtd.c:168:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(lib->mtd_dev) + 50]; data/fio-3.23/oslib/libmtd.c:186:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(patt) + 100]; data/fio-3.23/oslib/libmtd.c:210:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd, buf, sizeof(buf)); data/fio-3.23/oslib/libmtd.c:262:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd, buf, 50); data/fio-3.23/oslib/libmtd.c:359:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:375:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:391:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(patt) + 50]; data/fio-3.23/oslib/libmtd.c:497:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(lib->mtd_name) + 10]; data/fio-3.23/oslib/libmtd.c:521:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) >= 255) { data/fio-3.23/oslib/libmtd.c:655:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char file[strlen(lib->mtd) + 10]; data/fio-3.23/oslib/libmtd.c:698:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(dirent->d_name) >= 255) { data/fio-3.23/oslib/libmtd.c:1076:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, len); data/fio-3.23/oslib/libmtd.c:1350:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(in_fd, buf, mtd->eb_size - offs - rd); data/fio-3.23/oslib/libmtd_legacy.c:82:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, pi->buf, PROC_MTD_MAX_LEN); data/fio-3.23/oslib/strlcat.c:44:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return(dlen + strlen(src)); data/fio-3.23/oslib/strndup.c:12:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, s, n); data/fio-3.23/parse.c:52:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(vp2->ival) - strlen(vp1->ival); data/fio-3.23/parse.c:52:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(vp2->ival) - strlen(vp1->ival); data/fio-3.23/parse.c:183:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(c); i++) data/fio-3.23/parse.c:229:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(c); i++) { data/fio-3.23/parse.c:358:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/fio-3.23/parse.c:419:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(s)) data/fio-3.23/parse.c:431:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(p)) data/fio-3.23/parse.c:443:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = p + strlen(p); data/fio-3.23/parse.c:464:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(p)) data/fio-3.23/parse.c:483:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(str); data/fio-3.23/parse.c:490:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return max(strlen(vp->ival), opt_len(str)); data/fio-3.23/parse.c:783:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(ptr)) data/fio-3.23/parse.c:1176:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(opt); data/fio-3.23/parse.c:1178:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(opt + len + 1, post, strlen(post)); data/fio-3.23/parse.c:1199:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int s1_len = strlen(s1); data/fio-3.23/parse.c:1200:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int s2_len = strlen(s2); data/fio-3.23/parse.c:1242:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(opt); data/fio-3.23/server.c:1646:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(p->name); data/fio-3.23/server.c:1653:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(p->value); data/fio-3.23/server.c:2211:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode = umask(000); data/fio-3.23/server.c:2216:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(addr.sun_family) + strlen(bind_sock) + 1; data/fio-3.23/server.c:2224:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mode); data/fio-3.23/server.c:2389:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(host)) data/fio-3.23/smalloc.c:576:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ptr = smalloc(strlen(str) + 1); data/fio-3.23/stat.c:1078:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(ts->description)) data/fio-3.23/stat.c:1488:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(ts->description)) { data/fio-3.23/stat.c:1659:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(ts->description)) data/fio-3.23/stat.c:2224:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (time_buf[strlen(time_buf) - 1] == '\n') data/fio-3.23/stat.c:2225:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). time_buf[strlen(time_buf) - 1] = '\0'; data/fio-3.23/stat.c:2371:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (temp_dir && strlen(temp_dir) >= PATH_MAX) data/fio-3.23/t/btrace2fio.c:182:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, total); data/fio-3.23/t/btrace2fio.c:1063:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &t, sizeof(t)); data/fio-3.23/t/dedupe.c:368:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); data/fio-3.23/t/verify-state.c:118:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, sb.st_size); data/fio-3.23/tickmarks.c:52:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(str); data/fio-3.23/tickmarks.c:83:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(str); data/fio-3.23/unittests/lib/strntol.c:9:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). long ret = strntol(s, strlen(s), &endp, 10); data/fio-3.23/unittests/lib/strntol.c:20:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). long ret = strntol(s, strlen(s), &endp, 10); data/fio-3.23/unittests/lib/strntol.c:31:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). long ret = strntol(s, strlen(s), &endp, 16); data/fio-3.23/unittests/oslib/strlcat.c:29:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ret = strlcat(dst, src, strlen(dst)); data/fio-3.23/unittests/oslib/strndup.c:16:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CU_ASSERT_EQUAL(strlen(p), 3); data/fio-3.23/unittests/oslib/strndup.c:27:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CU_ASSERT_EQUAL(strlen(p), 4); data/fio-3.23/unittests/oslib/strndup.c:38:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CU_ASSERT_EQUAL(strlen(p), 4); data/fio-3.23/verify.c:1797:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, &hdr, sizeof(hdr)); data/fio-3.23/verify.c:1816:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, s, hdr.size); ANALYSIS SUMMARY: Hits = 816 Lines analyzed = 91280 in approximately 2.94 seconds (31055 lines/second) Physical Source Lines of Code (SLOC) = 69463 Hits@level = [0] 432 [1] 198 [2] 506 [3] 14 [4] 96 [5] 2 Hits@level+ = [0+] 1248 [1+] 816 [2+] 618 [3+] 112 [4+] 98 [5+] 2 Hits/KSLOC@level+ = [0+] 17.9664 [1+] 11.7473 [2+] 8.89682 [3+] 1.61237 [4+] 1.41082 [5+] 0.0287923 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.