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/libnet-freedb-perl-0.10/lib/linux.h Examining data/libnet-freedb-perl-0.10/lib/discid.h Examining data/libnet-freedb-perl-0.10/lib/win32.h Examining data/libnet-freedb-perl-0.10/lib/freebsd.h Examining data/libnet-freedb-perl-0.10/lib/toc.h Examining data/libnet-freedb-perl-0.10/lib/scsidefs.h Examining data/libnet-freedb-perl-0.10/lib/myaspi32.h Examining data/libnet-freedb-perl-0.10/lib/toctool.h FINAL RESULTS: data/libnet-freedb-perl-0.10/lib/win32.h:279:10: [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. hDll = LoadLibrary("WNASPI32.DLL"); data/libnet-freedb-perl-0.10/lib/freebsd.h:64: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[12], data/libnet-freedb-perl-0.10/lib/freebsd.h:69: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, "%u", n); data/libnet-freedb-perl-0.10/lib/freebsd.h:143: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, O_RDONLY | O_NONBLOCK); data/libnet-freedb-perl-0.10/lib/linux.h:77: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). drive = open(dev, O_RDONLY | O_NONBLOCK); data/libnet-freedb-perl-0.10/lib/toctool.h:22: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[32]; data/libnet-freedb-perl-0.10/lib/toctool.h: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 desc[32]; data/libnet-freedb-perl-0.10/lib/toctool.h:44: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 desc[32]; data/libnet-freedb-perl-0.10/lib/win32.h:272:3: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(interfaces[INTERFACE_ASPI].name, "ASPI"); data/libnet-freedb-perl-0.10/lib/win32.h:359:10: [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 foo[2048]; data/libnet-freedb-perl-0.10/lib/win32.h:132:2: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). lstrcpyn(szBuf, driveList.drive[driveNo].a.desc, bufLen); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1319 in approximately 0.07 seconds (19635 lines/second) Physical Source Lines of Code (SLOC) = 896 Hits@level = [0] 14 [1] 1 [2] 9 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 25 [1+] 11 [2+] 10 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 27.9018 [1+] 12.2768 [2+] 11.1607 [3+] 1.11607 [4+] 0 [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.