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/kinect-audio-setup-0.5/kinect_upload_fw/endian.c Examining data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c FINAL RESULTS: data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:67:18: [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 LOG(...) printf(__VA_ARGS__) data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:86: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 buffer[512]; data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:110:12: [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 dump[512]; data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:188: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 page[0x4000]; data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:257: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). FILE *fw = fopen(filename, "rb"); data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:189:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read; data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:192:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read <= 0) { data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:197:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cmd.bytes = fn_le32((unsigned int)read); data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:210:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (bytes_sent < read) { data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:226:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). addr += (uint32_t)read; data/kinect-audio-setup-0.5/kinect_upload_fw/kinect_upload_fw.c:228:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } while (read > 0); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 361 in approximately 0.06 seconds (6154 lines/second) Physical Source Lines of Code (SLOC) = 270 Hits@level = [0] 19 [1] 6 [2] 4 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 30 [1+] 11 [2+] 5 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 111.111 [1+] 40.7407 [2+] 18.5185 [3+] 3.7037 [4+] 3.7037 [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.