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/delve-1.5.0/_fixtures/cgostacktest/hello.c Examining data/delve-1.5.0/_fixtures/cgostacktest/hello.h Examining data/delve-1.5.0/_fixtures/testvariablescgo/test.c Examining data/delve-1.5.0/pkg/proc/native/exc.h Examining data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c Examining data/delve-1.5.0/pkg/proc/native/exec_darwin.c Examining data/delve-1.5.0/pkg/proc/native/exec_darwin.h Examining data/delve-1.5.0/pkg/proc/native/mach_exc.h Examining data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c Examining data/delve-1.5.0/pkg/proc/native/proc_darwin.c Examining data/delve-1.5.0/pkg/proc/native/proc_darwin.h Examining data/delve-1.5.0/pkg/proc/native/proc_freebsd.c Examining data/delve-1.5.0/pkg/proc/native/proc_freebsd.h Examining data/delve-1.5.0/pkg/proc/native/ptrace_freebsd_amd64.c Examining data/delve-1.5.0/pkg/proc/native/ptrace_freebsd_amd64.h Examining data/delve-1.5.0/pkg/proc/native/threads_darwin.c Examining data/delve-1.5.0/pkg/proc/native/threads_darwin.h FINAL RESULTS: data/delve-1.5.0/_fixtures/testvariablescgo/test.c:33: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(s, s0); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:266:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:451:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:464:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:505: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. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 224); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:509:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:707:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 4 * codeCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:720:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:761: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. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 224); data/delve-1.5.0/pkg/proc/native/exc_user_darwin.c:765:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:266:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 8 * codeCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:451:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 8 * codeCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:464:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:505: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. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 224); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:509:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:707:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->code, (const char *) code, 8 * codeCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:720:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) InP->old_state, (const char *) old_state, 4 * old_stateCnt); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:761: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. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * 224); data/delve-1.5.0/pkg/proc/native/mach_exc_user_darwin.c:765:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy((char *) new_state, (const char *) Out0P->new_state, 4 * Out0P->new_stateCnt); data/delve-1.5.0/pkg/proc/native/proc_darwin.c:92: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 pathbuf[PATH_MAX]; data/delve-1.5.0/pkg/proc/native/proc_darwin.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(slice, (void*)list, count*sizeof(list[0])); data/delve-1.5.0/pkg/proc/native/proc_darwin.c:145: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 data[256]; data/delve-1.5.0/pkg/proc/native/threads_darwin.c:39: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(d, (void *)data, len); data/delve-1.5.0/_fixtures/testvariablescgo/test.c:32: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). char *s = malloc(strlen(s0) + 1); data/delve-1.5.0/pkg/proc/native/exec_darwin.c:49:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t n = read(efd[0], &w, 1); data/delve-1.5.0/pkg/proc/native/exec_darwin.c:64:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd[0], &sig, 1); ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 2994 in approximately 0.26 seconds (11630 lines/second) Physical Source Lines of Code (SLOC) = 2289 Hits@level = [0] 1 [1] 3 [2] 22 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 27 [1+] 26 [2+] 23 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 11.7955 [1+] 11.3587 [2+] 10.0481 [3+] 0.436872 [4+] 0.436872 [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.