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/jinput-20100502+dfsg/plugins/wintab/src/native/net_java_games_input_WinTabContext.c Examining data/jinput-20100502+dfsg/plugins/wintab/src/native/net_java_games_input_WinTabDevice.c Examining data/jinput-20100502+dfsg/plugins/common/src/native/util.h Examining data/jinput-20100502+dfsg/plugins/common/src/native/util.c Examining data/jinput-20100502+dfsg/plugins/OSX/src/native/net_java_games_input_OSXHIDQueue.c Examining data/jinput-20100502+dfsg/plugins/OSX/src/native/macosxutil.h Examining data/jinput-20100502+dfsg/plugins/OSX/src/native/net_java_games_input_OSXHIDDevice.c Examining data/jinput-20100502+dfsg/plugins/OSX/src/native/net_java_games_input_OSXHIDDeviceIterator.c Examining data/jinput-20100502+dfsg/plugins/OSX/src/native/macosxutil.c Examining data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxJoystickDevice.c Examining data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c FINAL RESULTS: data/jinput-20100502+dfsg/plugins/common/src/native/util.c:52:5: [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. vsnprintf(buffer, BUFFER_SIZE, format, ap); data/jinput-20100502+dfsg/plugins/OSX/src/native/net_java_games_input_OSXHIDDevice.c:77:53: [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). IOReturn ioReturnValue = (*hidDeviceInterface)->open(hidDeviceInterface, 0); data/jinput-20100502+dfsg/plugins/common/src/native/util.c:47:5: [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 buffer[BUFFER_SIZE]; data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c:56:11: [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). int fd = open(path_str, flags); data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c:73: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 device_name[BUFFER_SIZE]; data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxJoystickDevice.c:54:11: [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). int fd = open(path_str, O_RDONLY | O_NONBLOCK); data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxJoystickDevice.c:71: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 device_name[BUFFER_SIZE]; data/jinput-20100502+dfsg/plugins/wintab/src/native/net_java_games_input_WinTabDevice.c:15: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 name[50]; data/jinput-20100502+dfsg/plugins/wintab/src/native/net_java_games_input_WinTabDevice.c:69: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 name[50]; data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxEventDevice.c:170:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &event, sizeof(struct input_event)) == -1) { data/jinput-20100502+dfsg/plugins/linux/src/native/net_java_games_input_LinuxJoystickDevice.c:150:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &event, sizeof(event)) == -1) { ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1412 in approximately 0.13 seconds (10735 lines/second) Physical Source Lines of Code (SLOC) = 909 Hits@level = [0] 0 [1] 2 [2] 8 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 11 [1+] 11 [2+] 9 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 12.1012 [1+] 12.1012 [2+] 9.90099 [3+] 1.10011 [4+] 1.10011 [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.