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/lxmusic-0.4.7/src/utils.c Examining data/lxmusic-0.4.7/src/lxmusic-plugin-config.h Examining data/lxmusic-0.4.7/src/lxmusic-plugin-config.c Examining data/lxmusic-0.4.7/src/utils.h Examining data/lxmusic-0.4.7/src/lxmusic.c Examining data/lxmusic-0.4.7/src/lxmusic-notify.c Examining data/lxmusic-0.4.7/src/lxmusic-notify.h FINAL RESULTS: data/lxmusic-0.4.7/src/lxmusic.c:749:2: [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( buf, size_str ); data/lxmusic-0.4.7/src/lxmusic.c:2530:29: [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( !xmmsc_connect(con, getenv("XMMS_PATH")) ) data/lxmusic-0.4.7/src/lxmusic.c:2533:36: [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. || !xmmsc_connect(con, getenv ("XMMS_PATH")) ) data/lxmusic-0.4.7/src/lxmusic.c:189:9: [2] (misc) fopen: 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). f = fopen(path, "w"); data/lxmusic-0.4.7/src/lxmusic.c:344:59: [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). gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), atoi(val)); data/lxmusic-0.4.7/src/lxmusic.c:566:13: [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 str[32]; data/lxmusic-0.4.7/src/lxmusic.c:742: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 buf[100]; data/lxmusic-0.4.7/src/lxmusic.c:1284: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[16]; data/lxmusic-0.4.7/src/lxmusic.c:1295: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 time_buf[32]; data/lxmusic-0.4.7/src/lxmusic.c:1877: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[32]; data/lxmusic-0.4.7/src/lxmusic.c:754: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). int len = strlen(buf); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 3075 in approximately 0.11 seconds (29206 lines/second) Physical Source Lines of Code (SLOC) = 2366 Hits@level = [0] 11 [1] 1 [2] 7 [3] 2 [4] 1 [5] 0 Hits@level+ = [0+] 22 [1+] 11 [2+] 10 [3+] 3 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 9.29839 [1+] 4.6492 [2+] 4.22654 [3+] 1.26796 [4+] 0.422654 [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.