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/xserver-xorg-input-libinput-0.30.0/test/test-bezier.c Examining data/xserver-xorg-input-libinput-0.30.0/test/test-draglock.c Examining data/xserver-xorg-input-libinput-0.30.0/include/libinput-properties.h Examining data/xserver-xorg-input-libinput-0.30.0/src/draglock.h Examining data/xserver-xorg-input-libinput-0.30.0/src/bezier.h Examining data/xserver-xorg-input-libinput-0.30.0/src/draglock.c Examining data/xserver-xorg-input-libinput-0.30.0/src/bezier.c Examining data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c FINAL RESULTS: data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:167: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 btnmap[MAX_BUTTONS + 1]; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:1078: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 btnmap[MAX_BUTTONS + 1]; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:1221: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 btnmap[TABLET_NUM_BUTTONS]; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:1288: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 btnmap[MAX_BUTTONS]; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2086: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[64]; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2406:8: [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(path, flags); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2726:2: [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(matrix_out, matrix, sizeof(matrix)); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2732:2: [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(matrix_out, matrix, sizeof(matrix)); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2752: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(matrix_out, matrix, sizeof(matrix)); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:3086:2: [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(pcurve, controls, sizeof(controls)); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:3662: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 groups[4] = {0}; data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:3690:2: [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(groups, (unsigned char*)val->data, val->size); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:4502: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(driver_data->options.pressurecurve, controls, data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:5304: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 groups[4] = {0}, data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:2117:28: [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). (uint32_t)serial) > strlen(pInfo->name)) data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:4667:34: [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). Atom prop = MakeAtom(prop_name, strlen(prop_name), TRUE); data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:5581:11: [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). strlen(XI_PROP_DEVICE_NODE), data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:5585:9: [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). strlen(device_node), device_node, data/xserver-xorg-input-libinput-0.30.0/src/xf86libinput.c:5593:8: [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). strlen(XI_PROP_PRODUCT_ID), ANALYSIS SUMMARY: Hits = 19 Lines analyzed = 7243 in approximately 0.15 seconds (49636 lines/second) Physical Source Lines of Code (SLOC) = 5478 Hits@level = [0] 5 [1] 5 [2] 14 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 24 [1+] 19 [2+] 14 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.38116 [1+] 3.46842 [2+] 2.55568 [3+] 0 [4+] 0 [5+] 0 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.