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/playerctl-2.0.2/playerctl/playerctl-cli.c Examining data/playerctl-2.0.2/playerctl/playerctl-common.c Examining data/playerctl-2.0.2/playerctl/playerctl-common.h Examining data/playerctl-2.0.2/playerctl/playerctl-formatter.c Examining data/playerctl-2.0.2/playerctl/playerctl-formatter.h Examining data/playerctl-2.0.2/playerctl/playerctl-player-manager.c Examining data/playerctl-2.0.2/playerctl/playerctl-player-manager.h Examining data/playerctl-2.0.2/playerctl/playerctl-player-name.c Examining data/playerctl-2.0.2/playerctl/playerctl-player-name.h Examining data/playerctl-2.0.2/playerctl/playerctl-player.c Examining data/playerctl-2.0.2/playerctl/playerctl-player.h Examining data/playerctl-2.0.2/playerctl/playerctl.h FINAL RESULTS: data/playerctl-2.0.2/playerctl/playerctl-formatter.c:90: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 buf[1028]; data/playerctl-2.0.2/playerctl/playerctl-cli.c:342:23: [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). size_t last = strlen(position) - 1; data/playerctl-2.0.2/playerctl/playerctl-cli.c:398:23: [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). size_t last = strlen(volume) - 1; data/playerctl-2.0.2/playerctl/playerctl-common.c:166:41: [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). g_str_has_prefix(instance + strlen(name), ".instance")); data/playerctl-2.0.2/playerctl/playerctl-formatter.c:89:15: [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(format); data/playerctl-2.0.2/playerctl/playerctl-formatter.c:128:21: [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 (strlen(name) == 0) { data/playerctl-2.0.2/playerctl/playerctl-formatter.c:168:17: [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 (strlen(name) == 0) { data/playerctl-2.0.2/playerctl/playerctl-formatter.c:189:17: [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 (strlen(name) == 0) { data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:251:31: [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). const size_t prefix_len = strlen(MPRIS_PREFIX); data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:255:13: [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(bus_name) <= prefix_len) { data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:324: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). if (strlen(new_owner) == 0 && strlen(previous_owner) != 0) { data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:324:35: [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 (strlen(new_owner) == 0 && strlen(previous_owner) != 0) { data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:338:16: [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). } else if (strlen(previous_owner) == 0 && strlen(new_owner) != 0) { data/playerctl-2.0.2/playerctl/playerctl-player-manager.c:338:47: [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). } else if (strlen(previous_owner) == 0 && strlen(new_owner) != 0) { data/playerctl-2.0.2/playerctl/playerctl-player.c:879:21: [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). size_t offset = strlen(MPRIS_PREFIX); data/playerctl-2.0.2/playerctl/playerctl-player.c:1021:18: [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 offset = strlen(MPRIS_PREFIX); ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 4707 in approximately 0.14 seconds (32557 lines/second) Physical Source Lines of Code (SLOC) = 3244 Hits@level = [0] 4 [1] 15 [2] 1 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 20 [1+] 16 [2+] 1 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 6.16523 [1+] 4.93218 [2+] 0.308261 [3+] 0 [4+] 0 [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.