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/compiz-boxmenu-1.1.12/deskmenu-utils.c Examining data/compiz-boxmenu-1.1.12/deskmenu-wnck.h Examining data/compiz-boxmenu-1.1.12/deskmenu-utils.h Examining data/compiz-boxmenu-1.1.12/deskmenu-vplist-client.c Examining data/compiz-boxmenu-1.1.12/deskmenu-menu.h Examining data/compiz-boxmenu-1.1.12/deskmenu-documentlist-client.c Examining data/compiz-boxmenu-1.1.12/deskmenu-windowlist-client.c Examining data/compiz-boxmenu-1.1.12/deskmenu.c Examining data/compiz-boxmenu-1.1.12/deskmenu-common.h Examining data/compiz-boxmenu-1.1.12/deskmenu-dplist-client.c Examining data/compiz-boxmenu-1.1.12/deskmenu-menu.c Examining data/compiz-boxmenu-1.1.12/deskmenu-wnck.c FINAL RESULTS: data/compiz-boxmenu-1.1.12/deskmenu-utils.c:21:49: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. ret = g_regex_replace_literal(regex, f, -1, 0, g_get_home_dir(), 0, NULL); data/compiz-boxmenu-1.1.12/deskmenu-menu.c:530:11: [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). age = atoi(g_strstrip (item->age->str)); data/compiz-boxmenu-1.1.12/deskmenu-menu.c:538:13: [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). limit = atoi(g_strstrip (item->quantity->str)); data/compiz-boxmenu-1.1.12/deskmenu-documentlist-client.c:33:2: [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 (200000); data/compiz-boxmenu-1.1.12/deskmenu-dplist-client.c:32:2: [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 (200000); data/compiz-boxmenu-1.1.12/deskmenu-menu.c:162:74: [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_markup_parse_context_parse (context, (const gchar *)stdout_for_cmd, strlen((const char *)stdout_for_cmd), &error); data/compiz-boxmenu-1.1.12/deskmenu-menu.c:1171:52: [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 (!g_markup_parse_context_parse (context, text, strlen(text), &error) data/compiz-boxmenu-1.1.12/deskmenu-menu.c:1198: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(filename) == 0) { data/compiz-boxmenu-1.1.12/deskmenu-vplist-client.c:33:2: [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 (200000); data/compiz-boxmenu-1.1.12/deskmenu-windowlist-client.c:31:2: [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 (200000); data/compiz-boxmenu-1.1.12/deskmenu.c:30:5: [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 (200000); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 3158 in approximately 0.10 seconds (31072 lines/second) Physical Source Lines of Code (SLOC) = 2607 Hits@level = [0] 0 [1] 8 [2] 2 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 11 [2+] 3 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.21941 [1+] 4.21941 [2+] 1.15075 [3+] 0.383583 [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.