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/wmxmms2-0.6+repack/src/buttons.c Examining data/wmxmms2-0.6+repack/src/ikke.c Examining data/wmxmms2-0.6+repack/src/buttons.h Examining data/wmxmms2-0.6+repack/src/wmgeneral.c Examining data/wmxmms2-0.6+repack/src/options.c Examining data/wmxmms2-0.6+repack/src/options.h Examining data/wmxmms2-0.6+repack/src/wmgeneral.h Examining data/wmxmms2-0.6+repack/src/wmxmms2.c Examining data/wmxmms2-0.6+repack/src/xmms2cif.c Examining data/wmxmms2-0.6+repack/src/xmms2cif.h FINAL RESULTS: data/wmxmms2-0.6+repack/src/wmgeneral.c:451:3: [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(S_HOLD,s); data/wmxmms2-0.6+repack/src/wmgeneral.c:456:3: [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(S_HOLD,s); data/wmxmms2-0.6+repack/src/options.c:36:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c=(getopt_long (argc, argv, "u:s:c:hv", options, &index))) != -1){ data/wmxmms2-0.6+repack/src/wmgeneral.c:371: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 newXpmColorString[32]; data/wmxmms2-0.6+repack/src/wmgeneral.c:385:2: [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(newXpmColorString, "%c c #%04X%04X%04X", brightValueSign, data/wmxmms2-0.6+repack/src/wmgeneral.c:445: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. static char S_HOLD [100]; data/wmxmms2-0.6+repack/src/wmxmms2.c:29:8: [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. static char mask_bits[4096]; data/wmxmms2-0.6+repack/src/xmms2cif.c:18: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 songname[100]; data/wmxmms2-0.6+repack/src/xmms2cif.h:24: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 title_info[100]; data/wmxmms2-0.6+repack/src/xmms2cif.h:29:8: [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. extern char songname[100]; data/wmxmms2-0.6+repack/src/buttons.c:218:3: [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(50000); data/wmxmms2-0.6+repack/src/wmgeneral.c:412: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). drawPartString(s,x,y,0,strlen(s)-1); data/wmxmms2-0.6+repack/src/wmgeneral.c:421:6: [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(s)<=s_begin || s_begin > s_end){ data/wmxmms2-0.6+repack/src/wmgeneral.c:423:55: [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). fprintf(stderr,"strlen=%ld\ns_begin=%d\ns_end=%d\n",strlen(s),s_begin,s_end); data/wmxmms2-0.6+repack/src/wmgeneral.c:425: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). while (i < strlen(s)) { data/wmxmms2-0.6+repack/src/wmgeneral.c:465:6: [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(s)==s_offset){ data/wmxmms2-0.6+repack/src/wmgeneral.c:471:59: [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). drawPartString(s,x+(start_offset*FONT_WIDTH),y,s_offset,strlen(s)); data/wmxmms2-0.6+repack/src/wmxmms2.c:67: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(1000); data/wmxmms2-0.6+repack/src/wmxmms2.c:80:3: [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(100000); data/wmxmms2-0.6+repack/src/wmxmms2.c:132:3: [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/wmxmms2-0.6+repack/src/xmms2cif.c:235:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(numinfo.title_info, artist, sizeof(numinfo.title_info) - 1); data/wmxmms2-0.6+repack/src/xmms2cif.c:239: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). size_t len = strlen(numinfo.title_info); data/wmxmms2-0.6+repack/src/xmms2cif.c:240:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. if (len) { strncpy(numinfo.title_info + len, " - ", sizeof(numinfo.title_info) - len); len+=3;} data/wmxmms2-0.6+repack/src/xmms2cif.c:241:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(numinfo.title_info + len, title, sizeof(numinfo.title_info) - len); data/wmxmms2-0.6+repack/src/xmms2cif.c:248:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(numinfo.title_info,filename, ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 1549 in approximately 0.05 seconds (32924 lines/second) Physical Source Lines of Code (SLOC) = 1082 Hits@level = [0] 36 [1] 15 [2] 7 [3] 1 [4] 2 [5] 0 Hits@level+ = [0+] 61 [1+] 25 [2+] 10 [3+] 3 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 56.3771 [1+] 23.1054 [2+] 9.24214 [3+] 2.77264 [4+] 1.84843 [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.