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/python-uinput-0.11.2/libsuinput/examples/keyboard.c Examining data/python-uinput-0.11.2/libsuinput/examples/mouse.c Examining data/python-uinput-0.11.2/libsuinput/src/libudev.h Examining data/python-uinput-0.11.2/libsuinput/src/suinput.c Examining data/python-uinput-0.11.2/libsuinput/src/suinput.h FINAL RESULTS: data/python-uinput-0.11.2/libsuinput/src/suinput.c:123:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(retval, devnode); data/python-uinput-0.11.2/libsuinput/examples/keyboard.c:16:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(user_dev.name, "libsuinput-example-keyboard"); data/python-uinput-0.11.2/libsuinput/examples/mouse.c:18:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(user_dev.name, "libsuinput-example-mouse"); data/python-uinput-0.11.2/libsuinput/src/suinput.c:141:21: [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). uinput_fd = open(uinput_path, O_WRONLY | O_NONBLOCK); data/python-uinput-0.11.2/libsuinput/src/suinput.c:119:30: [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). if ((retval = malloc(strlen(devnode) + 1)) == NULL) { ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 582 in approximately 0.04 seconds (14963 lines/second) Physical Source Lines of Code (SLOC) = 370 Hits@level = [0] 0 [1] 1 [2] 3 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 5 [1+] 5 [2+] 4 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 13.5135 [1+] 13.5135 [2+] 10.8108 [3+] 2.7027 [4+] 2.7027 [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.