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/xboxdrv-0.8.8/src/arg_parser.cpp Examining data/xboxdrv-0.8.8/src/arg_parser.hpp Examining data/xboxdrv-0.8.8/src/axis_event.cpp Examining data/xboxdrv-0.8.8/src/axis_event.hpp Examining data/xboxdrv-0.8.8/src/axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axis_map.cpp Examining data/xboxdrv-0.8.8/src/axis_map.hpp Examining data/xboxdrv-0.8.8/src/axisevent/abs_axis_event_handler.cpp Examining data/xboxdrv-0.8.8/src/axisevent/abs_axis_event_handler.hpp Examining data/xboxdrv-0.8.8/src/axisevent/key_axis_event_handler.cpp Examining data/xboxdrv-0.8.8/src/axisevent/key_axis_event_handler.hpp Examining data/xboxdrv-0.8.8/src/axisevent/rel_axis_event_handler.cpp Examining data/xboxdrv-0.8.8/src/axisevent/rel_axis_event_handler.hpp Examining data/xboxdrv-0.8.8/src/axisevent/rel_repeat_axis_event_handler.cpp Examining data/xboxdrv-0.8.8/src/axisevent/rel_repeat_axis_event_handler.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/calibration_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/calibration_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/const_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/const_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/deadzone_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/deadzone_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/invert_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/invert_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/log_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/log_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/relative_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/relative_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/response_curve_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/response_curve_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/axisfilter/sensitivity_axis_filter.cpp Examining data/xboxdrv-0.8.8/src/axisfilter/sensitivity_axis_filter.hpp Examining data/xboxdrv-0.8.8/src/button_event.cpp Examining data/xboxdrv-0.8.8/src/button_event.hpp Examining data/xboxdrv-0.8.8/src/button_filter.cpp Examining data/xboxdrv-0.8.8/src/button_filter.hpp Examining data/xboxdrv-0.8.8/src/button_map.cpp Examining data/xboxdrv-0.8.8/src/button_map.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/abs_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/abs_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/cycle_key_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/cycle_key_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/cycle_key_sequence.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/cycle_key_sequence.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/exec_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/exec_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/key_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/key_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/macro_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/macro_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonevent/rel_button_event_handler.cpp Examining data/xboxdrv-0.8.8/src/buttonevent/rel_button_event_handler.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/autofire_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/autofire_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/click_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/click_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/const_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/const_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/delay_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/delay_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/invert_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/invert_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/log_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/log_button_filter.hpp Examining data/xboxdrv-0.8.8/src/buttonfilter/toggle_button_filter.cpp Examining data/xboxdrv-0.8.8/src/buttonfilter/toggle_button_filter.hpp Examining data/xboxdrv-0.8.8/src/chatpad.cpp Examining data/xboxdrv-0.8.8/src/chatpad.hpp Examining data/xboxdrv-0.8.8/src/command_line_options.cpp Examining data/xboxdrv-0.8.8/src/command_line_options.hpp Examining data/xboxdrv-0.8.8/src/controller.cpp Examining data/xboxdrv-0.8.8/src/controller.hpp Examining data/xboxdrv-0.8.8/src/controller_config.cpp Examining data/xboxdrv-0.8.8/src/controller_config.hpp Examining data/xboxdrv-0.8.8/src/controller_factory.cpp Examining data/xboxdrv-0.8.8/src/controller_factory.hpp Examining data/xboxdrv-0.8.8/src/controller_match_rule.cpp Examining data/xboxdrv-0.8.8/src/controller_match_rule.hpp Examining data/xboxdrv-0.8.8/src/controller_options.cpp Examining data/xboxdrv-0.8.8/src/controller_options.hpp Examining data/xboxdrv-0.8.8/src/controller_ptr.hpp Examining data/xboxdrv-0.8.8/src/controller_slot.cpp Examining data/xboxdrv-0.8.8/src/controller_slot.hpp Examining data/xboxdrv-0.8.8/src/controller_slot_config.cpp Examining data/xboxdrv-0.8.8/src/controller_slot_config.hpp Examining data/xboxdrv-0.8.8/src/controller_slot_options.cpp Examining data/xboxdrv-0.8.8/src/controller_slot_options.hpp Examining data/xboxdrv-0.8.8/src/controller_slot_ptr.hpp Examining data/xboxdrv-0.8.8/src/controller_thread.cpp Examining data/xboxdrv-0.8.8/src/controller_thread.hpp Examining data/xboxdrv-0.8.8/src/dbus_subsystem.cpp Examining data/xboxdrv-0.8.8/src/dbus_subsystem.hpp Examining data/xboxdrv-0.8.8/src/dummy_message_processor.cpp Examining data/xboxdrv-0.8.8/src/dummy_message_processor.hpp Examining data/xboxdrv-0.8.8/src/enum_box.hpp Examining data/xboxdrv-0.8.8/src/evdev_absmap.cpp Examining data/xboxdrv-0.8.8/src/evdev_absmap.hpp Examining data/xboxdrv-0.8.8/src/evdev_controller.cpp Examining data/xboxdrv-0.8.8/src/evdev_controller.hpp Examining data/xboxdrv-0.8.8/src/evdev_helper.cpp Examining data/xboxdrv-0.8.8/src/evdev_helper.hpp Examining data/xboxdrv-0.8.8/src/firestorm_dual_controller.cpp Examining data/xboxdrv-0.8.8/src/firestorm_dual_controller.hpp Examining data/xboxdrv-0.8.8/src/force_feedback_handler.cpp Examining data/xboxdrv-0.8.8/src/force_feedback_handler.hpp Examining data/xboxdrv-0.8.8/src/generic_usb_controller.cpp Examining data/xboxdrv-0.8.8/src/generic_usb_controller.hpp Examining data/xboxdrv-0.8.8/src/headset.cpp Examining data/xboxdrv-0.8.8/src/headset.hpp Examining data/xboxdrv-0.8.8/src/helper.cpp Examining data/xboxdrv-0.8.8/src/helper.hpp Examining data/xboxdrv-0.8.8/src/ini_builder.hpp Examining data/xboxdrv-0.8.8/src/ini_parser.cpp Examining data/xboxdrv-0.8.8/src/ini_parser.hpp Examining data/xboxdrv-0.8.8/src/ini_schema.cpp Examining data/xboxdrv-0.8.8/src/ini_schema.hpp Examining data/xboxdrv-0.8.8/src/ini_schema_builder.cpp Examining data/xboxdrv-0.8.8/src/ini_schema_builder.hpp Examining data/xboxdrv-0.8.8/src/linux_uinput.cpp Examining data/xboxdrv-0.8.8/src/linux_uinput.hpp Examining data/xboxdrv-0.8.8/src/log.cpp Examining data/xboxdrv-0.8.8/src/log.hpp Examining data/xboxdrv-0.8.8/src/main/main.cpp Examining data/xboxdrv-0.8.8/src/message_processor.hpp Examining data/xboxdrv-0.8.8/src/modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/axismap_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/axismap_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/buttonmap_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/buttonmap_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/dpad_restrictor_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/dpad_restrictor_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/dpad_rotation_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/dpad_rotation_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/four_way_restrictor_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/four_way_restrictor_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/rotate_axis_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/rotate_axis_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/square_axis_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/square_axis_modifier.hpp Examining data/xboxdrv-0.8.8/src/modifier/statistic_modifier.cpp Examining data/xboxdrv-0.8.8/src/modifier/statistic_modifier.hpp Examining data/xboxdrv-0.8.8/src/options.cpp Examining data/xboxdrv-0.8.8/src/options.hpp Examining data/xboxdrv-0.8.8/src/path.cpp Examining data/xboxdrv-0.8.8/src/path.hpp Examining data/xboxdrv-0.8.8/src/playstation3_usb_controller.cpp Examining data/xboxdrv-0.8.8/src/playstation3_usb_controller.hpp Examining data/xboxdrv-0.8.8/src/pretty_printer.cpp Examining data/xboxdrv-0.8.8/src/pretty_printer.hpp Examining data/xboxdrv-0.8.8/src/raise_exception.hpp Examining data/xboxdrv-0.8.8/src/saitek_p2500_controller.cpp Examining data/xboxdrv-0.8.8/src/saitek_p2500_controller.hpp Examining data/xboxdrv-0.8.8/src/saitek_p3600_controller.cpp Examining data/xboxdrv-0.8.8/src/saitek_p3600_controller.hpp Examining data/xboxdrv-0.8.8/src/select.cpp Examining data/xboxdrv-0.8.8/src/select.hpp Examining data/xboxdrv-0.8.8/src/udev_subsystem.cpp Examining data/xboxdrv-0.8.8/src/udev_subsystem.hpp Examining data/xboxdrv-0.8.8/src/ui_abs_event_collector.cpp Examining data/xboxdrv-0.8.8/src/ui_abs_event_collector.hpp Examining data/xboxdrv-0.8.8/src/ui_abs_event_emitter.cpp Examining data/xboxdrv-0.8.8/src/ui_abs_event_emitter.hpp Examining data/xboxdrv-0.8.8/src/ui_event.cpp Examining data/xboxdrv-0.8.8/src/ui_event.hpp Examining data/xboxdrv-0.8.8/src/ui_event_collector.cpp Examining data/xboxdrv-0.8.8/src/ui_event_collector.hpp Examining data/xboxdrv-0.8.8/src/ui_event_emitter.cpp Examining data/xboxdrv-0.8.8/src/ui_event_emitter.hpp Examining data/xboxdrv-0.8.8/src/ui_event_sequence.cpp Examining data/xboxdrv-0.8.8/src/ui_event_sequence.hpp Examining data/xboxdrv-0.8.8/src/ui_key_event_collector.cpp Examining data/xboxdrv-0.8.8/src/ui_key_event_collector.hpp Examining data/xboxdrv-0.8.8/src/ui_key_event_emitter.cpp Examining data/xboxdrv-0.8.8/src/ui_key_event_emitter.hpp Examining data/xboxdrv-0.8.8/src/ui_rel_event_collector.cpp Examining data/xboxdrv-0.8.8/src/ui_rel_event_collector.hpp Examining data/xboxdrv-0.8.8/src/ui_rel_event_emitter.cpp Examining data/xboxdrv-0.8.8/src/ui_rel_event_emitter.hpp Examining data/xboxdrv-0.8.8/src/uinput.cpp Examining data/xboxdrv-0.8.8/src/uinput.hpp Examining data/xboxdrv-0.8.8/src/uinput_config.cpp Examining data/xboxdrv-0.8.8/src/uinput_config.hpp Examining data/xboxdrv-0.8.8/src/uinput_message_processor.cpp Examining data/xboxdrv-0.8.8/src/uinput_message_processor.hpp Examining data/xboxdrv-0.8.8/src/uinput_options.cpp Examining data/xboxdrv-0.8.8/src/uinput_options.hpp Examining data/xboxdrv-0.8.8/src/unpack.hpp Examining data/xboxdrv-0.8.8/src/usb_controller.cpp Examining data/xboxdrv-0.8.8/src/usb_controller.hpp Examining data/xboxdrv-0.8.8/src/usb_gsource.cpp Examining data/xboxdrv-0.8.8/src/usb_gsource.hpp Examining data/xboxdrv-0.8.8/src/usb_helper.cpp Examining data/xboxdrv-0.8.8/src/usb_helper.hpp Examining data/xboxdrv-0.8.8/src/usb_interface.cpp Examining data/xboxdrv-0.8.8/src/usb_interface.hpp Examining data/xboxdrv-0.8.8/src/usb_subsystem.cpp Examining data/xboxdrv-0.8.8/src/usb_subsystem.hpp Examining data/xboxdrv-0.8.8/src/word_wrap.cpp Examining data/xboxdrv-0.8.8/src/word_wrap.hpp Examining data/xboxdrv-0.8.8/src/xbox360_controller.cpp Examining data/xboxdrv-0.8.8/src/xbox360_controller.hpp Examining data/xboxdrv-0.8.8/src/xbox360_wireless_controller.cpp Examining data/xboxdrv-0.8.8/src/xbox360_wireless_controller.hpp Examining data/xboxdrv-0.8.8/src/xbox_controller.cpp Examining data/xboxdrv-0.8.8/src/xbox_controller.hpp Examining data/xboxdrv-0.8.8/src/xboxdrv.cpp Examining data/xboxdrv-0.8.8/src/xboxdrv.hpp Examining data/xboxdrv-0.8.8/src/xboxdrv_daemon.cpp Examining data/xboxdrv-0.8.8/src/xboxdrv_daemon.hpp Examining data/xboxdrv-0.8.8/src/xboxdrv_g_controller.cpp Examining data/xboxdrv-0.8.8/src/xboxdrv_g_controller.hpp Examining data/xboxdrv-0.8.8/src/xboxdrv_g_daemon.cpp Examining data/xboxdrv-0.8.8/src/xboxdrv_g_daemon.hpp Examining data/xboxdrv-0.8.8/src/xboxdrv_main.cpp Examining data/xboxdrv-0.8.8/src/xboxdrv_main.hpp Examining data/xboxdrv-0.8.8/src/xboxmsg.cpp Examining data/xboxdrv-0.8.8/src/xboxmsg.hpp Examining data/xboxdrv-0.8.8/src/xpad_device.cpp Examining data/xboxdrv-0.8.8/src/xpad_device.hpp Examining data/xboxdrv-0.8.8/test/dirname_test.cpp Examining data/xboxdrv-0.8.8/test/ini_parser_test.cpp Examining data/xboxdrv-0.8.8/test/unpack_test.cpp Examining data/xboxdrv-0.8.8/test/usb_system_test.cpp Examining data/xboxdrv-0.8.8/tools/evsend.cpp Examining data/xboxdrv-0.8.8/tools/evtest.c Examining data/xboxdrv-0.8.8/tools/evtestplus.cpp Examining data/xboxdrv-0.8.8/tools/jstest.c Examining data/xboxdrv-0.8.8/tools/usbcat.cpp Examining data/xboxdrv-0.8.8/tools/usbdebug.cpp Examining data/xboxdrv-0.8.8/tools/usbread.cpp Examining data/xboxdrv-0.8.8/tools/usbtool.c FINAL RESULTS: data/xboxdrv-0.8.8/src/buttonevent/exec_button_event_handler.cpp:75:11: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execvp(m_args[0].c_str(), argv) == -1) data/xboxdrv-0.8.8/src/helper.cpp:202:9: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execvp(args[0].c_str(), argv) == -1) data/xboxdrv-0.8.8/src/uinput.cpp:545:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename1, F_OK) != 0 && access(filename2, F_OK) != 0) data/xboxdrv-0.8.8/src/uinput.cpp:545:41: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename1, F_OK) != 0 && access(filename2, F_OK) != 0) data/xboxdrv-0.8.8/src/uinput.cpp:559:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(filename, F_OK) != 0) data/xboxdrv-0.8.8/tools/evtest.c:219:15: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(filename, pathname); data/xboxdrv-0.8.8/tools/evtest.c:221:15: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(filename, el->d_name); data/xboxdrv-0.8.8/src/xboxdrv_daemon.cpp:153:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("DISPLAY")) data/xboxdrv-0.8.8/tools/usbcat.cpp:317:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/xboxdrv-0.8.8/tools/usbread.cpp:4:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/xboxdrv-0.8.8/src/arg_parser.cpp:248: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. char option[256] = { 0 }; data/xboxdrv-0.8.8/src/arg_parser.cpp:249: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. char argument[256] = { 0 }; data/xboxdrv-0.8.8/src/chatpad.cpp:203:7: [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(&msg, transfer->buffer, transfer->actual_length); data/xboxdrv-0.8.8/src/chatpad.cpp:383:3: [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(data + 8, data_in, length); data/xboxdrv-0.8.8/src/chatpad.cpp:459:3: [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(old_state, m_state, 256); data/xboxdrv-0.8.8/src/command_line_options.cpp:902: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. char busid[4] = { '\0' }; data/xboxdrv-0.8.8/src/command_line_options.cpp:903: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. char devid[4] = { '\0' }; data/xboxdrv-0.8.8/src/evdev_controller.cpp:57:10: [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). m_fd = open(filename.c_str(), O_RDONLY | O_NONBLOCK); data/xboxdrv-0.8.8/src/evdev_controller.cpp:65: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 c_name[1024] = "unknown"; data/xboxdrv-0.8.8/src/headset.cpp:55: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 data[32]; data/xboxdrv-0.8.8/src/ini_schema.cpp:118:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *m_data = atoi(value.c_str()); data/xboxdrv-0.8.8/src/ini_schema.cpp:142:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *m_data = atoi(value.c_str()); data/xboxdrv-0.8.8/src/linux_uinput.cpp:64:17: [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). if ((m_fd = open(uinput_filename[i], O_RDWR | O_NDELAY)) >= 0) data/xboxdrv-0.8.8/src/saitek_p2500_controller.cpp:89:5: [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(&msg_in, data, sizeof(SaitekP2500Msg)); data/xboxdrv-0.8.8/src/saitek_p3600_controller.cpp:128:5: [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(&msg_in, data, sizeof(SaitekP3600Msg)); data/xboxdrv-0.8.8/src/uinput.cpp:539: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 filename1[32]; data/xboxdrv-0.8.8/src/uinput.cpp:540: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 filename2[32]; data/xboxdrv-0.8.8/src/uinput.cpp:542: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(filename1, "/dev/input/js%d", i); data/xboxdrv-0.8.8/src/uinput.cpp:543: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(filename2, "/dev/js%d", i); data/xboxdrv-0.8.8/src/uinput.cpp:555: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 filename[32]; data/xboxdrv-0.8.8/src/uinput.cpp:557: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(filename, "/dev/input/event%d", i); data/xboxdrv-0.8.8/src/unpack.hpp:30: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 c[4]; data/xboxdrv-0.8.8/src/usb_controller.cpp:57:7: [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[1024]; data/xboxdrv-0.8.8/src/usb_controller.cpp:159:3: [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(data, data_in, len); data/xboxdrv-0.8.8/src/usb_controller.cpp:191:3: [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(data + 8, data_in, wLength); data/xboxdrv-0.8.8/src/usb_interface.cpp:146:3: [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(data, data_in, len); data/xboxdrv-0.8.8/src/xbox_controller.cpp:65:5: [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(&msg_out->xbox, data, sizeof(XboxMsg)); data/xboxdrv-0.8.8/src/xboxdrv.cpp:150:3: [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(sorted_devices.get(), xpad_devices, sizeof(XPadDevice) * xpad_devices_count); data/xboxdrv-0.8.8/tools/evsend.cpp:25:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). event.type = atoi(argv[2]); data/xboxdrv-0.8.8/tools/evsend.cpp:26:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). event.code = atoi(argv[3]); data/xboxdrv-0.8.8/tools/evsend.cpp:27:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). event.value = atoi(argv[4]); data/xboxdrv-0.8.8/tools/evsend.cpp:29:16: [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(filename, O_RDWR); data/xboxdrv-0.8.8/tools/evtest.c:41:1: [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 *events[EV_MAX + 1] = { "Reset", "Key", "Relative", "Absolute", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, data/xboxdrv-0.8.8/tools/evtest.c:43:1: [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 *keys[KEY_MAX + 1] = { "Reserved", "Esc", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "Minus", "Equal", "Backspace", data/xboxdrv-0.8.8/tools/evtest.c:84:1: [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 *absval[5] = { "Value", "Min ", "Max ", "Fuzz ", "Flat " }; data/xboxdrv-0.8.8/tools/evtest.c:85:1: [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 *relatives[REL_MAX + 1] = { "X", "Y", "Z", NULL, NULL, NULL, "HWheel", "Dial", "Wheel" }; data/xboxdrv-0.8.8/tools/evtest.c:86:1: [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 *absolutes[ABS_MAX + 1] = { "X", "Y", "Z", "Rx", "Ry", "Rz", "Throttle", "Rudder", "Wheel", "Gas", "Brake", data/xboxdrv-0.8.8/tools/evtest.c:89:1: [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 *leds[LED_MAX + 1] = { "NumLock", "CapsLock", "ScrollLock", "Compose", "Kana", "Sleep", "Suspend", "Mute" }; data/xboxdrv-0.8.8/tools/evtest.c:90:1: [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 *repeats[REP_MAX + 1] = { "Delay", "Period" }; data/xboxdrv-0.8.8/tools/evtest.c:91:1: [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 *sounds[SND_MAX + 1] = { "Bell", "Click" }; data/xboxdrv-0.8.8/tools/evtest.c:93:1: [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 **names[EV_MAX + 1] = { events, keys, relatives, absolutes, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, data/xboxdrv-0.8.8/tools/evtest.c:138: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[256] = "Unknown"; data/xboxdrv-0.8.8/tools/evtest.c:140: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). if ((fd = open(filename, O_RDONLY)) < 0) data/xboxdrv-0.8.8/tools/evtest.c:217:15: [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 filename[len]; data/xboxdrv-0.8.8/tools/evtest.c:238: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[256] = "Unknown"; data/xboxdrv-0.8.8/tools/evtest.c:241: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). if ((fd = open(filename, O_RDONLY)) < 0) { data/xboxdrv-0.8.8/tools/evtestplus.cpp:23:7: [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 phys[1024]; data/xboxdrv-0.8.8/tools/evtestplus.cpp:34:7: [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 phys[1024]; data/xboxdrv-0.8.8/tools/evtestplus.cpp:45:7: [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 phys[1024]; data/xboxdrv-0.8.8/tools/evtestplus.cpp:83:17: [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). if ((fd = open(filename, O_RDONLY)) < 0) data/xboxdrv-0.8.8/tools/jstest.c:53:1: [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 *axis_names[ABS_MAX + 1] = { data/xboxdrv-0.8.8/tools/jstest.c:60:1: [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 *button_names[KEY_MAX - BTN_MISC + 1] = { data/xboxdrv-0.8.8/tools/jstest.c:77: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[NAME_LENGTH] = "Unknown"; data/xboxdrv-0.8.8/tools/jstest.c:94:12: [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). if ((fd = open(argv[argc - 1], O_RDONLY)) < 0) { data/xboxdrv-0.8.8/tools/usbcat.cpp:30:7: [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 iProduct_buf[1024] = "(null)"; data/xboxdrv-0.8.8/tools/usbcat.cpp:280:15: [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 rumblecmd[len]; data/xboxdrv-0.8.8/tools/usbcat.cpp:341:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). interface = atoi(argv[4]); data/xboxdrv-0.8.8/tools/usbcat.cpp:344:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). endpoint = atoi(argv[5]); data/xboxdrv-0.8.8/tools/usbdebug.cpp:321:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int endpoint = atoi(args[i].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:337:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int interface = atoi(args[i].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:360:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int interface = atoi(args[i].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:383:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int interface = atoi(args[i].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:593:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int endpoint = atoi(args[1].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:644:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int endpoint = atoi(args[1].c_str()); data/xboxdrv-0.8.8/tools/usbdebug.cpp:707:47: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). USBDevice::current()->set_configuration(atoi(args[1].c_str())); data/xboxdrv-0.8.8/tools/usbdebug.cpp:719:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). USBDevice::current()->set_altinterface(atoi(args[1].c_str())); data/xboxdrv-0.8.8/tools/usbdebug.cpp:731:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). USBDevice::current()->clear_halt(atoi(args[1].c_str())); data/xboxdrv-0.8.8/tools/usbread.cpp:25:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). interface = atoi(argv[4]); data/xboxdrv-0.8.8/tools/usbread.cpp:28:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). endpoint = atoi(argv[5]); data/xboxdrv-0.8.8/tools/usbtool.c:83:16: [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(argv[2], O_RDWR); data/xboxdrv-0.8.8/src/command_line_options.cpp:905:15: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(opt.argument.c_str(), "%3s:%3s", busid, devid) != 2) data/xboxdrv-0.8.8/src/evdev_controller.cpp:240:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((rd = ::read(m_fd, ev, sizeof(struct input_event) * 128)) > 0) data/xboxdrv-0.8.8/src/evdev_controller.hpp:65:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(XboxGenericMsg& msg, int timeout); data/xboxdrv-0.8.8/src/headset.cpp:56:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = m_fin->read(data, sizeof(data)).gcount(); data/xboxdrv-0.8.8/src/headset.cpp:88:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int len = m_fin->read(reinterpret_cast<char*>(transfer->buffer), transfer->length).gcount(); data/xboxdrv-0.8.8/src/ini_parser.cpp:349:12: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). INIParser::getchar() data/xboxdrv-0.8.8/src/ini_parser.hpp:56:8: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int getchar(); data/xboxdrv-0.8.8/src/linux_uinput.cpp:230:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(user_dev.name, name.c_str(), UINPUT_MAX_NAME_SIZE); data/xboxdrv-0.8.8/src/linux_uinput.cpp:341:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((ret = read(m_fd, &ev, sizeof(ev))) == sizeof(ev)) data/xboxdrv-0.8.8/src/xboxdrv_main.cpp:153:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/xboxdrv-0.8.8/tools/evtest.c:216:25: [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). int len = strlen(pathname) + 1 + strlen(el->d_name) + 1; data/xboxdrv-0.8.8/tools/evtest.c:216:48: [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). int len = strlen(pathname) + 1 + strlen(el->d_name) + 1; data/xboxdrv-0.8.8/tools/evtest.c:220:15: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(filename, "/"); data/xboxdrv-0.8.8/tools/evtest.c:285:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rd = read(fd, ev, sizeof(struct input_event) * 64); data/xboxdrv-0.8.8/tools/jstest.c:138:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &js, JS_RETURN) != JS_RETURN) { data/xboxdrv-0.8.8/tools/jstest.c:148:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/xboxdrv-0.8.8/tools/jstest.c:167:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) { data/xboxdrv-0.8.8/tools/jstest.c:209:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) { data/xboxdrv-0.8.8/tools/jstest.c:233:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(fd, &js, sizeof(struct js_event)) == sizeof(struct js_event)) { data/xboxdrv-0.8.8/tools/jstest.c:243:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/xboxdrv-0.8.8/tools/jstest.c:267:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &js, sizeof(struct js_event)) != sizeof(struct js_event)) { data/xboxdrv-0.8.8/tools/usbdebug.cpp:135:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(int endpoint, uint8_t* data, int len) data/xboxdrv-0.8.8/tools/usbdebug.cpp:227:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ret = USBDevice::current()->read(endpoint, data, sizeof(data)); data/xboxdrv-0.8.8/tools/usbdebug.cpp:616:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10 * 1000); data/xboxdrv-0.8.8/tools/usbdebug.cpp:631:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(static_cast<useconds_t>(1000 * 1000 * seconds)); ANALYSIS SUMMARY: Hits = 105 Lines analyzed = 29394 in approximately 0.65 seconds (45274 lines/second) Physical Source Lines of Code (SLOC) = 20142 Hits@level = [0] 66 [1] 25 [2] 70 [3] 3 [4] 7 [5] 0 Hits@level+ = [0+] 171 [1+] 105 [2+] 80 [3+] 10 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 8.48972 [1+] 5.21299 [2+] 3.9718 [3+] 0.496475 [4+] 0.347533 [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.