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/spiped-1.6.1/tests/valgrind/potential-memleaks.c Examining data/spiped-1.6.1/tests/dnsthread-resolve/main.c Examining data/spiped-1.6.1/tests/pushbits/main.c Examining data/spiped-1.6.1/tests/nc-client/main.c Examining data/spiped-1.6.1/tests/nc-server/simple_server.h Examining data/spiped-1.6.1/tests/nc-server/simple_server.c Examining data/spiped-1.6.1/tests/nc-server/main.c Examining data/spiped-1.6.1/proto/proto_pipe.h Examining data/spiped-1.6.1/proto/proto_handshake.c Examining data/spiped-1.6.1/proto/proto_conn.h Examining data/spiped-1.6.1/proto/proto_crypt.h Examining data/spiped-1.6.1/proto/proto_pipe.c Examining data/spiped-1.6.1/proto/proto_conn.c Examining data/spiped-1.6.1/proto/proto_crypt.c Examining data/spiped-1.6.1/proto/proto_handshake.h Examining data/spiped-1.6.1/perftests/send-zeros/main.c Examining data/spiped-1.6.1/perftests/recv-zeros/main.c Examining data/spiped-1.6.1/libcperciva/events/events.h Examining data/spiped-1.6.1/libcperciva/events/events_internal.h Examining data/spiped-1.6.1/libcperciva/events/events.c Examining data/spiped-1.6.1/libcperciva/events/events_immediate.c Examining data/spiped-1.6.1/libcperciva/events/events_network_selectstats.c Examining data/spiped-1.6.1/libcperciva/events/events_timer.c Examining data/spiped-1.6.1/libcperciva/events/events_network.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_entropy_rdrand.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_dh.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aes.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aes_aesni.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aesctr.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_dh_group14.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_verify_bytes.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aes.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aes_aesni.c Examining data/spiped-1.6.1/libcperciva/crypto/crypto_entropy_rdrand.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_dh.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_verify_bytes.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_aesctr.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_dh_group14.h Examining data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c Examining data/spiped-1.6.1/libcperciva/cpusupport/cpusupport_x86_shani.c Examining data/spiped-1.6.1/libcperciva/cpusupport/cpusupport.h Examining data/spiped-1.6.1/libcperciva/cpusupport/cpusupport_x86_rdrand.c Examining data/spiped-1.6.1/libcperciva/cpusupport/cpusupport_x86_ssse3.c Examining data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-SSSE3.c Examining data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-AESNI.c Examining data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-RDRAND.c Examining data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-CPUID.c Examining data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-SHANI.c Examining data/spiped-1.6.1/libcperciva/cpusupport/cpusupport_x86_aesni.c Examining data/spiped-1.6.1/libcperciva/alg/sha256_shani.c Examining data/spiped-1.6.1/libcperciva/alg/sha256.c Examining data/spiped-1.6.1/libcperciva/alg/sha256.h Examining data/spiped-1.6.1/libcperciva/alg/sha256_shani.h Examining data/spiped-1.6.1/libcperciva/POSIX/posix-clock_realtime.c Examining data/spiped-1.6.1/libcperciva/POSIX/posix-l.c Examining data/spiped-1.6.1/libcperciva/POSIX/posix-restrict.c Examining data/spiped-1.6.1/libcperciva/POSIX/posix-msg_nosignal.c Examining data/spiped-1.6.1/libcperciva/POSIX/posix-clock_gettime.c Examining data/spiped-1.6.1/libcperciva/POSIX/posix-cflags-filter.c Examining data/spiped-1.6.1/libcperciva/util/setuidgid.h Examining data/spiped-1.6.1/libcperciva/util/monoclock.h Examining data/spiped-1.6.1/libcperciva/util/sock_util.c Examining data/spiped-1.6.1/libcperciva/util/parsenum.h Examining data/spiped-1.6.1/libcperciva/util/imalloc.h Examining data/spiped-1.6.1/libcperciva/util/entropy.c Examining data/spiped-1.6.1/libcperciva/util/insecure_memzero.c Examining data/spiped-1.6.1/libcperciva/util/daemonize.h Examining data/spiped-1.6.1/libcperciva/util/ctassert.h Examining data/spiped-1.6.1/libcperciva/util/asprintf.c Examining data/spiped-1.6.1/libcperciva/util/noeintr.c Examining data/spiped-1.6.1/libcperciva/util/sock.c Examining data/spiped-1.6.1/libcperciva/util/warnp.c Examining data/spiped-1.6.1/libcperciva/util/getopt.h Examining data/spiped-1.6.1/libcperciva/util/sock_internal.h Examining data/spiped-1.6.1/libcperciva/util/sock_util.h Examining data/spiped-1.6.1/libcperciva/util/sysendian.h Examining data/spiped-1.6.1/libcperciva/util/setuidgid.c Examining data/spiped-1.6.1/libcperciva/util/monoclock.c Examining data/spiped-1.6.1/libcperciva/util/getopt.c Examining data/spiped-1.6.1/libcperciva/util/warnp.h Examining data/spiped-1.6.1/libcperciva/util/daemonize.c Examining data/spiped-1.6.1/libcperciva/util/asprintf.h Examining data/spiped-1.6.1/libcperciva/util/noeintr.h Examining data/spiped-1.6.1/libcperciva/util/sock.h Examining data/spiped-1.6.1/libcperciva/util/entropy.h Examining data/spiped-1.6.1/libcperciva/util/insecure_memzero.h Examining data/spiped-1.6.1/libcperciva/datastruct/timerqueue.c Examining data/spiped-1.6.1/libcperciva/datastruct/mpool.h Examining data/spiped-1.6.1/libcperciva/datastruct/ptrheap.h Examining data/spiped-1.6.1/libcperciva/datastruct/elasticarray.h Examining data/spiped-1.6.1/libcperciva/datastruct/timerqueue.h Examining data/spiped-1.6.1/libcperciva/datastruct/elasticarray.c Examining data/spiped-1.6.1/libcperciva/datastruct/ptrheap.c Examining data/spiped-1.6.1/libcperciva/network/network_read.c Examining data/spiped-1.6.1/libcperciva/network/network_write.c Examining data/spiped-1.6.1/libcperciva/network/network.h Examining data/spiped-1.6.1/libcperciva/network/network_accept.c Examining data/spiped-1.6.1/libcperciva/network/network_connect.c Examining data/spiped-1.6.1/spiped/dispatch.h Examining data/spiped-1.6.1/spiped/dispatch.c Examining data/spiped-1.6.1/spiped/main.c Examining data/spiped-1.6.1/lib/dnsthread/dnsthread.c Examining data/spiped-1.6.1/lib/dnsthread/dnsthread.h Examining data/spiped-1.6.1/lib/util/graceful_shutdown.h Examining data/spiped-1.6.1/lib/util/graceful_shutdown.c Examining data/spiped-1.6.1/spipe/main.c Examining data/spiped-1.6.1/spipe/pushbits.c Examining data/spiped-1.6.1/spipe/pushbits.h FINAL RESULTS: data/spiped-1.6.1/libcperciva/util/asprintf.c:20: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, format, ap); data/spiped-1.6.1/libcperciva/util/asprintf.c:34: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(*ret, buflen, format, ap); data/spiped-1.6.1/libcperciva/util/getopt.c:44:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/spiped-1.6.1/libcperciva/util/sock.c:38: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(sa_un->sun_path, addr); data/spiped-1.6.1/libcperciva/util/warnp.c:57:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/spiped-1.6.1/libcperciva/util/warnp.c:72:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/spiped-1.6.1/libcperciva/util/getopt.c:139:1: [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. getopt(int argc, char * const argv[]) data/spiped-1.6.1/libcperciva/util/getopt.h:53:9: [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. #define getopt libcperciva_getopt data/spiped-1.6.1/libcperciva/util/getopt.h:73:28: [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. #define GETOPT(argc, argv) getopt(argc, argv) data/spiped-1.6.1/libcperciva/util/getopt.h:179: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. const char * getopt(int, char * const []); data/spiped-1.6.1/libcperciva/POSIX/posix-restrict.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 x[10]; data/spiped-1.6.1/libcperciva/POSIX/posix-restrict.c:12: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 y[10]; data/spiped-1.6.1/libcperciva/alg/sha256.c:192: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(S, state, 32); data/spiped-1.6.1/libcperciva/alg/sha256.c:257: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->buf[r], PAD, 56 - r); data/spiped-1.6.1/libcperciva/alg/sha256.c:260: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->buf[r], PAD, 64 - r); data/spiped-1.6.1/libcperciva/alg/sha256.c:286: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(ctx->state, initial_state, sizeof(initial_state)); data/spiped-1.6.1/libcperciva/alg/sha256.c:312: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->buf[r], src, len); data/spiped-1.6.1/libcperciva/alg/sha256.c:317: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(&ctx->buf[r], src, 64 - r); data/spiped-1.6.1/libcperciva/alg/sha256.c:330: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(ctx->buf, src, len); data/spiped-1.6.1/libcperciva/alg/sha256.c:567: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(&PShctx, &Phctx, sizeof(HMAC_SHA256_CTX)); data/spiped-1.6.1/libcperciva/alg/sha256.c:576: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(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX)); data/spiped-1.6.1/libcperciva/alg/sha256.c:581: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(T, U, 32); data/spiped-1.6.1/libcperciva/alg/sha256.c:585: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(&hctx, &Phctx, sizeof(HMAC_SHA256_CTX)); data/spiped-1.6.1/libcperciva/alg/sha256.c:598: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[i * 32], T, clen); data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-SHANI.c:4: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 a[16]; data/spiped-1.6.1/libcperciva/cpusupport/Build/cpusupport-X86-SSSE3.c:4: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 a[16]; data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.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(K, drbg.Key, 32); data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c:104: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(Vx, drbg.V, 32); data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c:130: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(drbg.Key, K, 32); data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c:131: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(drbg.V, Vx, 32); data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c:189: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(&buf[bufpos], drbg.V, 32); data/spiped-1.6.1/libcperciva/crypto/crypto_entropy.c:191: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(&buf[bufpos], drbg.V, buflen - bufpos); data/spiped-1.6.1/libcperciva/datastruct/elasticarray.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((uint8_t *)(EA->buf) + bufpos, buf, nrec * reclen); data/spiped-1.6.1/libcperciva/datastruct/elasticarray.c:351: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, EA->buf, EA->size); data/spiped-1.6.1/libcperciva/datastruct/mpool.h:70: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(allocs_new, M->allocs, data/spiped-1.6.1/libcperciva/datastruct/timerqueue.c:106: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(&r->tv, tv, sizeof(struct timeval)); data/spiped-1.6.1/libcperciva/datastruct/timerqueue.c:155: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(&r->tv, tv, sizeof(struct timeval)); data/spiped-1.6.1/libcperciva/events/events.c:153: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(&tv2, &tv_zero, sizeof(struct timeval)); data/spiped-1.6.1/libcperciva/events/events_network.c:197: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(&fds[pollpos], &fds[nfds-1], data/spiped-1.6.1/libcperciva/events/events_timer.c:75: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->tv_orig, timeo, sizeof(struct timeval)); data/spiped-1.6.1/libcperciva/network/network_connect.c:209: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(&C->timeo, timeo, sizeof(struct timeval)); data/spiped-1.6.1/libcperciva/util/daemonize.c:84:11: [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). if ((f = fopen(spid, "w")) == NULL) { data/spiped-1.6.1/libcperciva/util/entropy.c:38: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). if ((fd = open("/dev/urandom", O_RDONLY)) == -1) { data/spiped-1.6.1/libcperciva/util/getopt.c:37: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 popt[3]; data/spiped-1.6.1/libcperciva/util/setuidgid.c:240: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(*username_p, combined, pos); data/spiped-1.6.1/libcperciva/util/sock.c:111: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(sas[n]->name, r->ai_addr, sas[n]->namelen); data/spiped-1.6.1/libcperciva/util/sock_util.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(sa2->name, sa->name, sa2->namelen); data/spiped-1.6.1/libcperciva/util/sock_util.c:129: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(p, &sa->ai_family, sizeof(int)); data/spiped-1.6.1/libcperciva/util/sock_util.c:131: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(p, &sa->ai_socktype, sizeof(int)); data/spiped-1.6.1/libcperciva/util/sock_util.c:133: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(p, &sa->namelen, sizeof(socklen_t)); data/spiped-1.6.1/libcperciva/util/sock_util.c:135: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(p, sa->name, sa->namelen); data/spiped-1.6.1/libcperciva/util/sock_util.c:161: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(&sa->ai_family, buf, sizeof(int)); data/spiped-1.6.1/libcperciva/util/sock_util.c:163: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(&sa->ai_socktype, buf, sizeof(int)); data/spiped-1.6.1/libcperciva/util/sock_util.c:165: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(&sa->namelen, buf, sizeof(socklen_t)); data/spiped-1.6.1/libcperciva/util/sock_util.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(sa->name, buf, sa->namelen); data/spiped-1.6.1/libcperciva/util/sock_util.c:190: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 addr[INET_ADDRSTRLEN]; data/spiped-1.6.1/libcperciva/util/sock_util.c:198: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(&sa_in, name, namelen); data/spiped-1.6.1/libcperciva/util/sock_util.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 addr[INET6_ADDRSTRLEN]; data/spiped-1.6.1/libcperciva/util/sock_util.c:225: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(&sa_in6, name, namelen); data/spiped-1.6.1/proto/proto_crypt.c:45: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(k->k_hmac, &kbuf[32], 32); data/spiped-1.6.1/proto/proto_crypt.c:80:18: [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). } else if ((f = fopen(filename, "r")) == NULL) { data/spiped-1.6.1/proto/proto_crypt.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(&nonce_CS[0], nonce_c, PCRYPT_NONCE_LEN); data/spiped-1.6.1/proto/proto_crypt.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(&nonce_CS[PCRYPT_NONCE_LEN], nonce_s, PCRYPT_NONCE_LEN); data/spiped-1.6.1/proto/proto_crypt.c:157: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(dhmac_c, &dk_1[0], PCRYPT_DHMAC_LEN); data/spiped-1.6.1/proto/proto_crypt.c:158: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(dhmac_s, &dk_1[PCRYPT_DHMAC_LEN], PCRYPT_DHMAC_LEN); data/spiped-1.6.1/proto/proto_crypt.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(&nonce_y[0], nonce_c, PCRYPT_NONCE_LEN); data/spiped-1.6.1/proto/proto_crypt.c:273: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(&nonce_y[PCRYPT_NONCE_LEN], nonce_s, PCRYPT_NONCE_LEN); data/spiped-1.6.1/proto/proto_crypt.c:324: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(obuf, ibuf, len); data/spiped-1.6.1/proto/proto_crypt.c:384: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(obuf, ibuf, len); data/spiped-1.6.1/tests/nc-server/main.c:123:16: [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). if ((C->out = fopen(filename, "wb")) == NULL) { data/spiped-1.6.1/tests/pushbits/main.c:27: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). if ((in = open(filename_in, O_RDONLY)) == -1) { data/spiped-1.6.1/tests/pushbits/main.c:31:13: [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 ((out = open(filename_out, O_WRONLY | O_CREAT | O_TRUNC, data/spiped-1.6.1/lib/dnsthread/dnsthread.c:314:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(T->wakeupsock[1], &zero, 1) != 1) { data/spiped-1.6.1/libcperciva/util/daemonize.c:57:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (read(fd[0], &dummy, 1)) { data/spiped-1.6.1/libcperciva/util/entropy.c:45:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((lenread = read(fd, buf, buflen)) == -1) { data/spiped-1.6.1/libcperciva/util/getopt.c:320: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). opts[ln].olen = strlen(os); data/spiped-1.6.1/libcperciva/util/setuidgid.c:218: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(combined); data/spiped-1.6.1/libcperciva/util/sock.c:34: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(addr) >= sizeof(sa_un->sun_path)) { data/spiped-1.6.1/libcperciva/util/sock.c:261: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 (s[strlen(s) - 1] != ']') { data/spiped-1.6.1/libcperciva/util/sock.c:268: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). ips[strlen(ips) - 1] = '\0'; data/spiped-1.6.1/perftests/send-zeros/main.c:114:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(socket, buffer, 1) != 0) { data/spiped-1.6.1/spipe/pushbits.c:58:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((readlen = read(P->in, P->buf, BUFSIZ)) == -1) { data/spiped-1.6.1/tests/pushbits/main.c:130: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 msglen = strlen(msg) + 1; data/spiped-1.6.1/tests/pushbits/main.c:176:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(out[1], buf, msglen)) == -1) { data/spiped-1.6.1/tests/pushbits/main.c:214: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 msglen = strlen(msg) + 1; data/spiped-1.6.1/tests/pushbits/main.c:274:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(out[1], buf, msglen)) == -1) { data/spiped-1.6.1/tests/valgrind/potential-memleaks.c:24:56: [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 (* const volatile strlen_func)(const char *) = strlen; ANALYSIS SUMMARY: Hits = 87 Lines analyzed = 14194 in approximately 0.42 seconds (33514 lines/second) Physical Source Lines of Code (SLOC) = 8100 Hits@level = [0] 24 [1] 15 [2] 62 [3] 4 [4] 6 [5] 0 Hits@level+ = [0+] 111 [1+] 87 [2+] 72 [3+] 10 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 13.7037 [1+] 10.7407 [2+] 8.88889 [3+] 1.23457 [4+] 0.740741 [5+] 0 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.