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/wings3d-2.2.6.1/c_src/wings_pick_nif.c Examining data/wings3d-2.2.6.1/win32/wings3d.c FINAL RESULTS: data/wings3d-2.2.6.1/win32/wings3d.c:35:3: [2] (buffer) wchar_t: 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. wchar_t install_dir[MAX_PATH]; data/wings3d-2.2.6.1/win32/wings3d.c:36:3: [2] (buffer) wchar_t: 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. wchar_t cmd_line[3*MAX_PATH]; data/wings3d-2.2.6.1/win32/wings3d.c:37:3: [2] (buffer) wchar_t: 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. wchar_t pref_dir[MAX_PATH]; data/wings3d-2.2.6.1/win32/wings3d.c:38: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 message[40]; data/wings3d-2.2.6.1/win32/wings3d.c:99: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(message, "Failed to start Wings 3D: %u", GetLastError()); data/wings3d-2.2.6.1/win32/wings3d.c:108:14: [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* fp = fopen("bin/erl.ini", "w"); data/wings3d-2.2.6.1/win32/wings3d.c:109: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 dir[MAX_PATH]; data/wings3d-2.2.6.1/win32/wings3d.c:60:7: [1] (buffer) wcslen: 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 = wcslen(install_dir) - 1; data/wings3d-2.2.6.1/win32/wings3d.c:73:27: [1] (buffer) wcslen: 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). _snwprintf(cmd_line+wcslen(cmd_line), 3*MAX_PATH, L" -run wings_start start"); data/wings3d-2.2.6.1/win32/wings3d.c:75:27: [1] (buffer) wcslen: 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). _snwprintf(cmd_line+wcslen(cmd_line), 3*MAX_PATH, L" -detached"); data/wings3d-2.2.6.1/win32/wings3d.c:76:27: [1] (buffer) wcslen: 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). _snwprintf(cmd_line+wcslen(cmd_line), 3*MAX_PATH, L" -run wings_start start_halt"); data/wings3d-2.2.6.1/win32/wings3d.c:80:27: [1] (buffer) wcslen: 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). _snwprintf(cmd_line+wcslen(cmd_line), 3*MAX_PATH, L" \"%s\"", argv[1+i]); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 577 in approximately 0.09 seconds (6652 lines/second) Physical Source Lines of Code (SLOC) = 430 Hits@level = [0] 10 [1] 5 [2] 7 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 22 [1+] 12 [2+] 7 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 51.1628 [1+] 27.907 [2+] 16.2791 [3+] 0 [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.